mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-11 10:56:29 +00:00
Merge pull request #414 from zachborboa/cookie-test
Fix cookie file data failing to be included in request
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user