Skip to content

Commit 437e05c

Browse files
committed
cleanup test about extra cookie
1 parent c283606 commit 437e05c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/Unit/SymfonyCache/UserContextSubscriberTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ public function testUserHashUserWithSession($arg, $options)
132132
$cookieString = "PHPSESSID=$sessionId1; foo=bar; PHPSESSIDsdiuhsdf4535d4f=$sessionId2";
133133
$request = Request::create('/foo', 'GET', array(), $cookies, array(), array('Cookie' => $cookieString));
134134

135-
// Add a cookie which should not be available in the eventual hash request anymore
136-
$request->cookies->set('foo', 'bar');
137-
138135
$hashRequest = Request::create($options['user_hash_uri'], $options['user_hash_method'], array(), array(), array(), $request->server->all());
139136
$hashRequest->attributes->set('internalRequest', true);
140137
$hashRequest->headers->set('Accept', $options['user_hash_accept_header']);
@@ -188,10 +185,8 @@ public function testUserHashUserWithAuthorizationHeader($arg, $options)
188185
{
189186
$userContextSubscriber = new UserContextSubscriber($arg);
190187

191-
$request = Request::create('/foo', 'GET', array(), array(), array(), array('HTTP_AUTHORIZATION' => 'foo'));
192-
193-
// Add a cookie which should not be available in the eventual hash request anymore
194-
$request->cookies->set('foo', 'bar');
188+
// The foo cookie should not be available in the eventual hash request anymore
189+
$request = Request::create('/foo', 'GET', array(), array('foo' => 'bar'), array(), array('HTTP_AUTHORIZATION' => 'foo'));
195190

196191
$hashRequest = Request::create($options['user_hash_uri'], $options['user_hash_method'], array(), array(), array(), $request->server->all());
197192
$hashRequest->attributes->set('internalRequest', true);

0 commit comments

Comments
 (0)