summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Authentication
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-01-05 19:24:35 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2013-01-05 19:24:35 +0100
commitb11eb9120cde5e05fccc39fdeef7fadf0fb4fa4d (patch)
treed98fe5b4737c868b532b5a528b9ca25d3a59c760 /Tests/Core/Authentication
parent48018e4abb848ff1a2ecb781ca3303979e3a2357 (diff)
parent39b2670c52d0d53224cb671418e2a852b864f786 (diff)
downloadsymfony-security-b11eb9120cde5e05fccc39fdeef7fadf0fb4fa4d.zip
symfony-security-b11eb9120cde5e05fccc39fdeef7fadf0fb4fa4d.tar.gz
symfony-security-b11eb9120cde5e05fccc39fdeef7fadf0fb4fa4d.tar.bz2
merged branch bschussek/exceptionfix (PR #6582)
This PR was merged into the master branch. Commits ------- 184c8e5 Fixed @expectedException definitions to reference absolute exception paths Discussion ---------- Added leading slashes to @expectedException definitions Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: - License of the code: MIT Documentation PR: - This PR adds leading backslashes `\` to `@expectedException` declarations. The current version is inconsistent with other class references in doc blocks, which default to *relative* class names unless class name has a leading backslash. ```php /** * @param RelativeNs\Class $param1 * @param \AbsoluteNs\Class $param2 */ but /** * @expectedException AbsoluteNs\Class */ ``` Consequently, PHPStorm does not understand the current statements and marks them as erroneous (and correctly so IMO, even though PHPUnit's interpretation is more relaxed).
Diffstat (limited to 'Tests/Core/Authentication')
-rw-r--r--Tests/Core/Authentication/Provider/AnonymousAuthenticationProviderTest.php2
-rw-r--r--Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php12
-rw-r--r--Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php4
-rw-r--r--Tests/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php4
-rw-r--r--Tests/Core/Authentication/Provider/UserAuthenticationProviderTest.php14
-rw-r--r--Tests/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php4
6 files changed, 20 insertions, 20 deletions
diff --git a/Tests/Core/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/AnonymousAuthenticationProviderTest.php
index 0a76724..d0da147 100644
--- a/Tests/Core/Authentication/Provider/AnonymousAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/AnonymousAuthenticationProviderTest.php
@@ -31,7 +31,7 @@ class AnonymousAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testAuthenticateWhenKeyIsNotValid()
{
diff --git a/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php
index 4da0337..8b27061 100644
--- a/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php
@@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationPro
class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
{
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationServiceException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException
*/
public function testRetrieveUserWhenProviderDoesNotReturnAnUserInterface()
{
@@ -30,7 +30,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\UsernameNotFoundException
+ * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException
*/
public function testRetrieveUserWhenUsernameIsNotFound()
{
@@ -48,7 +48,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationServiceException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException
*/
public function testRetrieveUserWhenAnExceptionOccurs()
{
@@ -105,7 +105,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testCheckAuthenticationWhenCredentialsAreEmpty()
{
@@ -161,7 +161,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testCheckAuthenticationWhenCredentialsAreNotValid()
{
@@ -185,7 +185,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testCheckAuthenticationDoesNotReauthenticateWhenPasswordHasChanged()
{
diff --git a/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
index 9476c0d..f7ffb1e 100644
--- a/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
@@ -42,7 +42,7 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testAuthenticateWhenNoUserIsSet()
{
@@ -70,7 +70,7 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\LockedException
+ * @expectedException \Symfony\Component\Security\Core\Exception\LockedException
*/
public function testAuthenticateWhenUserCheckerThrowsException()
{
diff --git a/Tests/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php
index fcc2514..5e250e0 100644
--- a/Tests/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php
@@ -34,7 +34,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testAuthenticateWhenKeysDoNotMatch()
{
@@ -45,7 +45,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AccountExpiredException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
*/
public function testAuthenticateWhenPostChecksFails()
{
diff --git a/Tests/Core/Authentication/Provider/UserAuthenticationProviderTest.php b/Tests/Core/Authentication/Provider/UserAuthenticationProviderTest.php
index 1b68531..1516a5f 100644
--- a/Tests/Core/Authentication/Provider/UserAuthenticationProviderTest.php
+++ b/Tests/Core/Authentication/Provider/UserAuthenticationProviderTest.php
@@ -33,7 +33,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\UsernameNotFoundException
+ * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException
*/
public function testAuthenticateWhenUsernameIsNotFound()
{
@@ -47,7 +47,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
*/
public function testAuthenticateWhenUsernameIsNotFoundAndHideIsTrue()
{
@@ -61,7 +61,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationServiceException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException
*/
public function testAuthenticateWhenProviderDoesNotReturnAnUserInterface()
{
@@ -75,7 +75,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\CredentialsExpiredException
+ * @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException
*/
public function testAuthenticateWhenPreChecksFails()
{
@@ -95,7 +95,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AccountExpiredException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
*/
public function testAuthenticateWhenPostChecksFails()
{
@@ -115,7 +115,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
* @expectedExceptionMessage Bad credentials
*/
public function testAuthenticateWhenPostCheckAuthenticationFails()
@@ -134,7 +134,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\BadCredentialsException
+ * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
* @expectedExceptionMessage Foo
*/
public function testAuthenticateWhenPostCheckAuthenticationFailsWithHideFalse()
diff --git a/Tests/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php b/Tests/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php
index 3944fb1..1739714 100644
--- a/Tests/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php
+++ b/Tests/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php
@@ -27,7 +27,7 @@ class InMemoryTokenProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\TokenNotFoundException
+ * @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFoundException
*/
public function testLoadTokenBySeriesThrowsNotFoundException()
{
@@ -49,7 +49,7 @@ class InMemoryTokenProviderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\TokenNotFoundException
+ * @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFoundException
*/
public function testDeleteToken()
{