summaryrefslogtreecommitdiffstats
path: root/Tests/Core/Encoder
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Core/Encoder')
-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').'$';