How would you go about unit testing a curl implementation?
public function get() {
$ch = curl_init($this->request->getUrl());
curl_setopt($c
You might use a function mock library. I made one for you: php-mock-phpunit
namespace foo;
use phpmock\phpunit\PHPMock;
class BuiltinTest extends \PHPUnit_Framework_TestCase
{
use PHPMock;
public function testCurl()
{
$curl_exec = $this->getFunctionMock(__NAMESPACE__, "curl_exec");
$curl_exec->expects($this->once())->willReturn("body");
$ch = curl_init();
$this->assertEquals("body", curl_exec($ch));
}
}