summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Encoder
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-10-12 11:03:54 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-10-12 11:06:32 +0200
commit01c92f979f9a7b83457045bc562098604adbd454 (patch)
tree8d0a89cf09b828e891b9dbcbed478e6f541f2623 /Tests/Core/Encoder
parent3f3ab8f6b0a8ca0d84bdcfb9160692d82fcd7b7a (diff)
downloadsymfony-security-01c92f979f9a7b83457045bc562098604adbd454.zip
symfony-security-01c92f979f9a7b83457045bc562098604adbd454.tar.gz
symfony-security-01c92f979f9a7b83457045bc562098604adbd454.tar.bz2
[ci] Fix tests requirements
Diffstat (limited to 'Tests/Core/Encoder')
-rw-r--r--Tests/Core/Encoder/BCryptPasswordEncoderTest.php17
1 files changed, 6 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
*/