8000 minor #17073 [Security] skip bcrypt tests on incompatible platforms (… · symfony/symfony@337957a · GitHub
[go: up one dir, main page]

Skip to content

Commit 337957a

Browse files
minor #17073 [Security] skip bcrypt tests on incompatible platforms (Christian Flothmann, xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Security] skip bcrypt tests on incompatible platforms | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17055 | License | MIT | Doc PR | Not all PHP versions before 5.3.7 have backported fixes that make it possible to use `password_hash()` function. Therefore, we have to skip tests on not supported platforms. Commits ------- 2a6fa7b use requires annotation 65eb188 skip bcrypt tests on incompatible platforms
2 parents ff56eb2 + 2a6fa7b commit 337957a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ public function testCostInRange()
4545
}
4646
}
4747

48+
/**
49+
* @requires PHP 5.3.7
50+
*/
4851
public function testResultLength()
4952
{
5053
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
5154
$result = $encoder->encodePassword(self::PASSWORD, null);
5255
$this->assertEquals(60, strlen($result));
5356
}
5457

58+
/**
59+
* @requires PHP 5.3.7
60+
*/
5561
public function testValidation()
5662
{
5763
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
@@ -70,6 +76,9 @@ public function testEncodePasswordLength()
7076
$encoder->encodePassword(str_repeat('a', 73), 'salt');
7177
}
7278

79+
/**
80+
* @requires PHP 5.3.7
81+
*/
7382
public function testCheckPasswordLength()
7483
{
7584
$encoder = new BCryptPasswordEncoder(self::VALID_COST);

0 commit comments

Comments
 (0)
0