Skip to content

Commit 278d3a4

Browse files
Fix merge
1 parent ccae36d commit 278d3a4

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

Tests/Hasher/PasswordHasherFactoryTest.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -216,29 +216,6 @@ public function testMigrateFromWithCustomInstance()
216216
$this->assertTrue($hasher->verify($digest->hash('foo', null), 'foo', null));
217217
$this->assertStringStartsWith(\SODIUM_CRYPTO_PWHASH_STRPREFIX, $hasher->hash('foo', null));
218218
}
219-
220-
/**
221-
* @group legacy
222-
*/
223-
public function testMigrateFromLegacy()
224-
{
225-
if (!SodiumPasswordHasher::isSupported()) {
226-
$this->markTestSkipped('Sodium is not available');
227-
}
228-
229-
$factory = new PasswordHasherFactory([
230-
'plaintext_encoder' => $plaintext = new PlaintextPasswordEncoder(),
231-
SomeUser::class => ['algorithm' => 'sodium', 'migrate_from' => ['bcrypt', 'plaintext_encoder']],
232-
]);
233-
234-
$hasher = $factory->getPasswordHasher(SomeUser::class);
235-
$this->assertInstanceOf(MigratingPasswordHasher::class, $hasher);
236-
237-
$this->assertTrue($hasher->verify((new SodiumPasswordHasher())->hash('foo', null), 'foo', null));
238-
$this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, null, \PASSWORD_BCRYPT))->hash('foo', null), 'foo', null));
239-
$this->assertTrue($hasher->verify($plaintext->encodePassword('foo', null), 'foo', null));
240-
$this->assertStringStartsWith(\SODIUM_CRYPTO_PWHASH_STRPREFIX, $hasher->hash('foo', null));
241-
}
242219
}
243220

244221
class SomeUser implements PasswordAuthenticatedUserInterface

0 commit comments

Comments
 (0)