Add unit tests

This commit is contained in:
Mattéo D
2014-08-31 15:50:13 +02:00
parent 9da5d9d2ea
commit d0770339ca
+15
View File
@@ -744,6 +744,21 @@ class CurlTest extends PHPUnit_Framework_TestCase
));
}
public function testParallelGetOptions()
{
$test = new Test();
$curl = $test->curl;
$curl->setHeader('X-DEBUG-TEST', 'server');
$curl->complete(function ($instance) {
PHPUnit_Framework_Assert::assertEquals(Test::TEST_URL, $instance->getOpt(CURLOPT_URL));
});
$curl->get(array(
Test::TEST_URL,
), array(
'key' => 'HTTP_USER_AGENT',
));
}
public function testSuccessCallback()
{
$success_called = false;