summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-02-05 15:08:32 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2013-02-05 15:08:32 +0100
commitf02a0c86b6264fc461fc86d39704579439445d3e (patch)
tree966e6391e009d2761f7f3663944a6d96da3e0939 /Tests/Core/Encoder/BCryptPasswordEncoderTest.php
parent43ddef96e495136b3902c3808ec05818f53b89c4 (diff)
downloadsymfony-security-f02a0c86b6264fc461fc86d39704579439445d3e.zip
symfony-security-f02a0c86b6264fc461fc86d39704579439445d3e.tar.gz
symfony-security-f02a0c86b6264fc461fc86d39704579439445d3e.tar.bz2
[Security] fixed interface implementation (closes #6974)
Diffstat (limited to 'Tests/Core/Encoder/BCryptPasswordEncoderTest.php')
-rw-r--r--Tests/Core/Encoder/BCryptPasswordEncoderTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
index 0c1536a..bfaf5fc 100644
--- a/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
+++ b/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
@@ -66,16 +66,16 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
public function testResultLength()
{
$encoder = new BCryptPasswordEncoder($this->secureRandom, self::VALID_COST);
- $result = $encoder->encodePassword(self::PASSWORD);
+ $result = $encoder->encodePassword(self::PASSWORD, null);
$this->assertEquals(60, strlen($result));
}
public function testValidation()
{
$encoder = new BCryptPasswordEncoder($this->secureRandom, self::VALID_COST);
- $result = $encoder->encodePassword(self::PASSWORD);
- $this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD));
- $this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword'));
+ $result = $encoder->encodePassword(self::PASSWORD, null);
+ $this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null));
+ $this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null));
}
public function testValidationKnownPassword()
@@ -85,7 +85,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
? '2y' : '2a').'$';
$encrypted = $prefix.'04$ABCDEFGHIJKLMNOPQRSTU.uTmwd4KMSHxbUsG7bng8x7YdA0PM1iq';
- $this->assertTrue($encoder->isPasswordValid($encrypted, self::PASSWORD));
+ $this->assertTrue($encoder->isPasswordValid($encrypted, self::PASSWORD, null));
}
public function testSecureRandomIsUsed()
@@ -100,7 +100,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
;
$encoder = new BCryptPasswordEncoder($this->secureRandom, self::VALID_COST);
- $result = $encoder->encodePassword(self::PASSWORD);
+ $result = $encoder->encodePassword(self::PASSWORD, null);
$prefix = '$'.(version_compare(phpversion(), '5.3.7', '>=')
? '2y' : '2a').'$';