Merge pull request #414 from zachborboa/cookie-test

Fix cookie file data failing to be included in request
This commit is contained in:
Zach Borboa
2016-12-15 03:44:09 -08:00
committed by GitHub
+5 -2
View File
@@ -1025,12 +1025,15 @@ class CurlTest extends PHPUnit_Framework_TestCase
'0', // expires
'mycookie', // name
'yum', // value
));
)) . "\n";
file_put_contents($cookie_file, $cookie_data);
$test = new Test();
$test->curl->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
$test->curl->setCookieFile($cookie_file);
$this->assertEquals($cookie_data, file_get_contents($test->curl->getOpt(CURLOPT_COOKIEFILE)));
$this->assertEquals('yum', $test->server('cookie', 'GET', array(
'key' => 'mycookie',
)));
unlink($cookie_file);
$this->assertFalse(file_exists($cookie_file));