|
|
@@ -1491,19 +1491,19 @@ class ResponseTest extends TestCase
|
|
|
$this->assertSame($cookie, $new->getCookieCollection()->get('yay'));
|
|
|
}
|
|
|
|
|
|
- public function testWithoutCookieScalar()
|
|
|
+ public function testWithExpiredCookieScalar()
|
|
|
{
|
|
|
$response = new Response();
|
|
|
$response = $response->withCookie('testing', 'abc123');
|
|
|
$this->assertEquals('abc123', $response->getCookie('testing')['value']);
|
|
|
|
|
|
- $new = $response->withoutCookie('testing');
|
|
|
+ $new = $response->withExpiredCookie('testing');
|
|
|
|
|
|
$this->assertNull($response->getCookie('testing')['expire']);
|
|
|
$this->assertEquals('1', $new->getCookie('testing')['expire']);
|
|
|
}
|
|
|
|
|
|
- public function testWithoutCookieOptions()
|
|
|
+ public function testWithExpiredCookieOptions()
|
|
|
{
|
|
|
$options = [
|
|
|
'name' => 'testing',
|
|
|
@@ -1519,20 +1519,21 @@ class ResponseTest extends TestCase
|
|
|
$response = $response->withCookie('testing', $options);
|
|
|
$this->assertEquals($options, $response->getCookie('testing'));
|
|
|
|
|
|
- $new = $response->withoutCookie('testing', $options);
|
|
|
+ $new = $response->withExpiredCookie('testing', $options);
|
|
|
|
|
|
$this->assertEquals($options['expire'], $response->getCookie('testing')['expire']);
|
|
|
$this->assertEquals('1', $new->getCookie('testing')['expire']);
|
|
|
+ $this->assertEquals('', $new->getCookie('testing')['value']);
|
|
|
}
|
|
|
|
|
|
- public function testWithoutCookieObject()
|
|
|
+ public function testWithExpiredCookieObject()
|
|
|
{
|
|
|
$response = new Response();
|
|
|
$cookie = new Cookie('yay', 'a value');
|
|
|
$response = $response->withCookie($cookie);
|
|
|
$this->assertEquals('a value', $response->getCookie('yay')['value']);
|
|
|
|
|
|
- $new = $response->withoutCookie($cookie);
|
|
|
+ $new = $response->withExpiredCookie($cookie);
|
|
|
|
|
|
$this->assertNull($response->getCookie('yay')['expire']);
|
|
|
$this->assertEquals('1', $new->getCookie('yay')['expire']);
|