diff options
Diffstat (limited to 'Tests/Core')
-rw-r--r-- | Tests/Core/Encoder/BCryptPasswordEncoderTest.php | 17 | ||||
-rw-r--r-- | Tests/Core/SecurityContextTest.php | 5 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php index 3f8ba86..076d954 100644 --- a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php +++ b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php @@ -45,32 +45,27 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase } } + /** + * @requires PHP 5.3.7 + */ public function testResultLength() { - $this->skipIfPhpVersionIsNotSupported(); - $encoder = new BCryptPasswordEncoder(self::VALID_COST); $result = $encoder->encodePassword(self::PASSWORD, null); $this->assertEquals(60, strlen($result)); } + /** + * @requires PHP 5.3.7 + */ public function testValidation() { - $this->skipIfPhpVersionIsNotSupported(); - $encoder = new BCryptPasswordEncoder(self::VALID_COST); $result = $encoder->encodePassword(self::PASSWORD, null); $this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null)); $this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null)); } - private function skipIfPhpVersionIsNotSupported() - { - if (PHP_VERSION_ID < 50307) { - $this->markTestSkipped('Requires PHP >= 5.3.7'); - } - } - /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ diff --git a/Tests/Core/SecurityContextTest.php b/Tests/Core/SecurityContextTest.php index 124ebf9..6695889 100644 --- a/Tests/Core/SecurityContextTest.php +++ b/Tests/Core/SecurityContextTest.php @@ -89,4 +89,9 @@ class SecurityContextTest extends \PHPUnit_Framework_TestCase $context->setToken($token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertSame($token, $context->getToken()); } + + public function testTranslationsAreNotInCore() + { + $this->assertFalse(file_exists(__DIR__.'/../../Core/Resources/translations/')); + } } |