|
|
@@ -597,7 +597,6 @@ class ClientTest extends TestCase
|
|
|
$adapter = $this->getMockBuilder('Cake\Http\Client\Adapter\Stream')
|
|
|
->setMethods(['send'])
|
|
|
->getMock();
|
|
|
- $cookieJar = $this->getMockBuilder('Cake\Http\Client\CookieCollection')->getMock();
|
|
|
|
|
|
$headers = [
|
|
|
'HTTP/1.0 200 Ok',
|
|
|
@@ -605,16 +604,6 @@ class ClientTest extends TestCase
|
|
|
'Set-Cookie: expiring=now; Expires=Wed, 09-Jun-1999 10:18:14 GMT'
|
|
|
];
|
|
|
$response = new Response($headers, '');
|
|
|
-
|
|
|
- $cookieJar->expects($this->at(0))
|
|
|
- ->method('get')
|
|
|
- ->with('http://cakephp.org/projects')
|
|
|
- ->will($this->returnValue([]));
|
|
|
-
|
|
|
- $cookieJar->expects($this->at(1))
|
|
|
- ->method('store')
|
|
|
- ->with($response);
|
|
|
-
|
|
|
$adapter->expects($this->at(0))
|
|
|
->method('send')
|
|
|
->will($this->returnValue([$response]));
|
|
|
@@ -626,6 +615,10 @@ class ClientTest extends TestCase
|
|
|
]);
|
|
|
|
|
|
$http->get('/projects');
|
|
|
+ $cookies = $http->cookies();
|
|
|
+ $this->assertCount(1, $cookies);
|
|
|
+ $this->assertTrue($cookies->has('first'));
|
|
|
+ $this->assertFalse($cookies->has('expiring'));
|
|
|
}
|
|
|
|
|
|
/**
|