diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-10-05 17:24:55 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-10-05 17:24:55 +0200 |
commit | 4e3ea9f244ad465865c2384f3d9ba2f89361d364 (patch) | |
tree | 1ecfb1dd66e5203b64b8d6341fc76a15499a4350 /Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php | |
parent | e7529149fc3d42bab75d5d84f33dfa08bf649079 (diff) | |
parent | 99d73ecb12dedf5c772aab7f00e7d39b60c5f4ed (diff) | |
download | symfony-security-4e3ea9f244ad465865c2384f3d9ba2f89361d364.zip symfony-security-4e3ea9f244ad465865c2384f3d9ba2f89361d364.tar.gz symfony-security-4e3ea9f244ad465865c2384f3d9ba2f89361d364.tar.bz2 |
Merge branch '2.8'
* 2.8: (21 commits)
[Security][bugfix] "Remember me" cookie cleared on logout with custom "secure"/"httponly" config options [1]
[ci] Use current PHP_BINARY when running ./phpunit
Fixed typos
[UPGRADE-3.0] fix bullet indentation
Throw exception if tempnam returns false in ProcessPipes
[DomCrawler] Deprecated using /_root/ in XPath expressions
Pass missing request template variables
Simplify AbstractVoter
[Form] add missing deprecation triggers
Throw exception if tempnam returns false
Fix PropertyAccessor modifying array in object when array key does not exist
[DependencyInjection] Add autowiring capabilities
Fixing typo in variable name
Add a few additional tests for the Crawler
[Form] remove obsolete deprecation comments
Updated the style of the event commands
[Debug] Deprecate providing $fileLinkFormat as second argument
[Form] minor CS fix
Updated PHPDoc of the AbstractVoter class
[Security] InMemoryUserProvider now concerns whether user's password is changed when refreshing
...
Diffstat (limited to 'Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php')
-rw-r--r-- | Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index 889211c..43aaf92 100644 --- a/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -180,7 +180,7 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test public function testLogout() { - $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo')); + $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo', 'secure' => true, 'httponly' => false)); $request = new Request(); $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); $response = new Response(); @@ -201,6 +201,8 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test $this->assertTrue($cookie->isCleared()); $this->assertEquals('/foo', $cookie->getPath()); $this->assertEquals('foodomain.foo', $cookie->getDomain()); + $this->assertTrue($cookie->isSecure()); + $this->assertFalse($cookie->isHttpOnly()); } public function testLogoutSimplyIgnoresNonSetRequestCookie() @@ -311,6 +313,13 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test $userProvider = $this->getProvider(); } + if (!isset($options['secure'])) { + $options['secure'] = false; + } + if (!isset($options['httponly'])) { + $options['httponly'] = true; + } + return new PersistentTokenBasedRememberMeServices(array($userProvider), 'foosecret', 'fookey', $options, $logger, new SecureRandom(sys_get_temp_dir().'/_sf2.seed')); } |