X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FPassword%2FPasswordHashingTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FPassword%2FPasswordHashingTest.php;h=a4e57eaada35d0779f90220c3a927f4c67269be3;hp=d237ffa159ebfa6c5862915f4286fd357a5cdc34;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php b/web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php index d237ffa15..a4e57eaad 100644 --- a/web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php +++ b/web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php @@ -96,7 +96,7 @@ class PasswordHashingTest extends UnitTestCase { * @covers ::needsRehash */ public function testPasswordHashing() { - $this->assertSame($this->passwordHasher->getCountLog2($this->hashedPassword), PhpassHashedPassword::MIN_HASH_COUNT, 'Hashed password has the minimum number of log2 iterations.'); + $this->assertSame(PhpassHashedPassword::MIN_HASH_COUNT, $this->passwordHasher->getCountLog2($this->hashedPassword), 'Hashed password has the minimum number of log2 iterations.'); $this->assertNotEquals($this->hashedPassword, $this->md5HashedPassword, 'Password hashes not the same.'); $this->assertTrue($this->passwordHasher->check($this->password, $this->md5HashedPassword), 'Password check succeeds.'); $this->assertTrue($this->passwordHasher->check($this->password, $this->hashedPassword), 'Password check succeeds.'); @@ -119,7 +119,7 @@ class PasswordHashingTest extends UnitTestCase { $this->assertTrue($password_hasher->needsRehash($this->hashedPassword), 'Needs a new hash after incrementing the log2 count.'); // Re-hash the password. $rehashed_password = $password_hasher->hash($this->password); - $this->assertSame($password_hasher->getCountLog2($rehashed_password), PhpassHashedPassword::MIN_HASH_COUNT + 1, 'Re-hashed password has the correct number of log2 iterations.'); + $this->assertSame(PhpassHashedPassword::MIN_HASH_COUNT + 1, $password_hasher->getCountLog2($rehashed_password), 'Re-hashed password has the correct number of log2 iterations.'); $this->assertNotEquals($rehashed_password, $this->hashedPassword, 'Password hash changed again.'); // Now the hash should be OK.