diff --git a/tests/Http/HttpRedirectResponseTest.php b/tests/Http/HttpRedirectResponseTest.php index 5b369c0a02bd..3b41a6b6c965 100755 --- a/tests/Http/HttpRedirectResponseTest.php +++ b/tests/Http/HttpRedirectResponseTest.php @@ -75,6 +75,18 @@ public function testInputOnRedirect() $response->withInput(); } + public function testWithCookies() + { + $response = new RedirectResponse('foo.bar'); + $response->setRequest(Request::create('/', 'GET', ['name' => 'Taylor', 'age' => 26])); + $response->withCookies([ + new Cookie('name', 'milwad'), + ]); + + $this->assertEquals('name', $response->headers->getCookies()[0]->getName()); + $this->assertEquals('milwad', $response->headers->getCookies()[0]->getValue()); + } + public function testOnlyInputOnRedirect() { $response = new RedirectResponse('foo.bar');