@@ -216,29 +216,6 @@ public function testMigrateFromWithCustomInstance()
216
216
$ this ->assertTrue ($ hasher ->verify ($ digest ->hash ('foo ' , null ), 'foo ' , null ));
217
217
$ this ->assertStringStartsWith (\SODIUM_CRYPTO_PWHASH_STRPREFIX , $ hasher ->hash ('foo ' , null ));
218
218
}
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
- }
242
219
}
243
220
244
221
class SomeUser implements PasswordAuthenticatedUserInterface
0 commit comments