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 annotation65eb188
skip bcrypt tests on incompatible platforms
This commit is contained in:
commit
337957ad26
@ -45,6 +45,9 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 5.3.7
|
||||
*/
|
||||
public function testResultLength()
|
||||
{
|
||||
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
|
||||
@ -52,6 +55,9 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(60, strlen($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 5.3.7
|
||||
*/
|
||||
public function testValidation()
|
||||
{
|
||||
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
|
||||
@ -70,6 +76,9 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
|
||||
$encoder->encodePassword(str_repeat('a', 73), 'salt');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 5.3.7
|
||||
*/
|
||||
public function testCheckPasswordLength()
|
||||
{
|
||||
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
|
||||
|
Reference in New Issue
Block a user