diff options
author | Bernhard Schussek <bschussek@gmail.com> | 2014-09-25 12:18:55 +0200 |
---|---|---|
committer | Bernhard Schussek <bschussek@gmail.com> | 2014-09-25 12:18:55 +0200 |
commit | 12f35c0d4ba88e52cdc48ba302d266024cbd17e1 (patch) | |
tree | 5d050bd5efc06b3e98003532ad29ee0b8543a1ea /Core/Tests | |
parent | 88ac10c21de12eece696dc8f8dde9bcb11da4b10 (diff) | |
parent | 5aa642a5ad4022f377c0eb43115d754dc92c4ae0 (diff) | |
download | symfony-security-12f35c0d4ba88e52cdc48ba302d266024cbd17e1.zip symfony-security-12f35c0d4ba88e52cdc48ba302d266024cbd17e1.tar.gz symfony-security-12f35c0d4ba88e52cdc48ba302d266024cbd17e1.tar.bz2 |
Merge branch '2.5'
* 2.5:
[Command] Set the process title as late as possible
[Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5
[Validator] Simplified testing of violations
remove obsolete test file
[FrameworkBundle] output failed matched path for clarification
bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider
[Validator] Fixed StaticMethodLoaderTest to actually test something
[Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required
Use request format from request in twig ExceptionController
fixed bug
added the possibility to return null from SimplePreAuthenticationListener
[Form] Moved POST_MAX_SIZE validation from FormValidator to request handler
[Form] Add a form error if post_max_size has been reached.
Response::isNotModified returns true when If-Modified-Since is later than Last-Modified
[WebProfilerBundle] turbolinks compatibility
Conflicts:
src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
Diffstat (limited to 'Core/Tests')
-rw-r--r-- | Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php index d278ba4..a6fff4b 100644 --- a/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; -use Symfony\Component\Security\Core\Exception\AccountExpiredException; +use Symfony\Component\Security\Core\Exception\DisabledException; use Symfony\Component\Security\Core\Role\Role; class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase @@ -45,15 +45,14 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException + * @expectedException \Symfony\Component\Security\Core\Exception\DisabledException */ - public function testAuthenticateWhenPostChecksFails() + public function testAuthenticateWhenPreChecksFails() { $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) - ->method('checkPostAuth') - ->will($this->throwException(new AccountExpiredException())) - ; + ->method('checkPreAuth') + ->will($this->throwException(new DisabledException())); $provider = $this->getProvider($userChecker); @@ -65,8 +64,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $user->expects($this->exactly(2)) ->method('getRoles') - ->will($this->returnValue(array('ROLE_FOO'))) - ; + ->will($this->returnValue(array('ROLE_FOO'))); $provider = $this->getProvider(); @@ -86,16 +84,14 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $user ->expects($this->any()) ->method('getRoles') - ->will($this->returnValue(array())) - ; + ->will($this->returnValue(array())); } $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('getProviderKey'), array($user, 'foo', $key)); $token ->expects($this->once()) ->method('getProviderKey') - ->will($this->returnValue('foo')) - ; + ->will($this->returnValue('foo')); return $token; } |