mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 12:14:36 +00:00
Simplify setCookie tests
This commit is contained in:
@@ -957,9 +957,8 @@ class CurlTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$test = new Test();
|
||||
$test->curl->setCookie('mycookie', 'yum');
|
||||
$this->assertEquals('yum', $test->server('cookie', 'GET', array(
|
||||
'key' => 'mycookie',
|
||||
)));
|
||||
$test->server('setcookie', 'GET');
|
||||
$this->assertEquals('yum', $test->curl->responseCookies['mycookie']);
|
||||
}
|
||||
|
||||
public function testSetCookies()
|
||||
@@ -971,9 +970,11 @@ class CurlTest extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
$test = new Test();
|
||||
$test->curl->setCookies($cookies);
|
||||
$test->server('cookie', 'GET');
|
||||
$test->server('setcookie', 'GET');
|
||||
|
||||
$this->assertEquals(http_build_query($cookies, '', '&'), $test->curl->response);
|
||||
$this->assertEquals('yum', $test->curl->responseCookies['mycookie']);
|
||||
$this->assertEquals('apple', $test->curl->responseCookies['fruit']);
|
||||
$this->assertEquals('red', $test->curl->responseCookies['color']);
|
||||
}
|
||||
|
||||
public function testSetCookieEncodingSpace()
|
||||
|
||||
Reference in New Issue
Block a user