summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
diff options
context:
space:
mode:
authorJakub Zalas <jakub@zalas.pl>2014-04-01 15:48:06 +0100
committerJakub Zalas <jakub@zalas.pl>2014-04-01 15:48:06 +0100
commit11c6ba069dbe07aa890760544e38585581a2ee6e (patch)
tree19631b9fcf8a7d0f708d9a3185c56a1d5e147492 /Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
parentefead6dbd9f02b485753a33c7559797e8a39dc79 (diff)
downloadsymfony-security-11c6ba069dbe07aa890760544e38585581a2ee6e.zip
symfony-security-11c6ba069dbe07aa890760544e38585581a2ee6e.tar.gz
symfony-security-11c6ba069dbe07aa890760544e38585581a2ee6e.tar.bz2
[Security] Replace exception mocks with actual exception instances.v2.3.12
It is done for two reasons: * consistency - we use real exception objects in most of the code * latest phpunit does not like the way we were creating mocks for exceptions (it could be also fixed by letting phpunit to call the original constructor)
Diffstat (limited to 'Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php')
-rw-r--r--Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
index 8ad4549..17234b6 100644
--- a/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
@@ -12,6 +12,7 @@
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider;
+use Symfony\Component\Security\Core\Exception\LockedException;
class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
{
@@ -79,7 +80,7 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
$userChecker->expects($this->once())
->method('checkPostAuth')
- ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\LockedException', null, array(), '', false)))
+ ->will($this->throwException(new LockedException()))
;
$provider = $this->getProvider($user, $userChecker);