Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git] / tests / phpunit / includes / password / Pbkdf2PasswordTest.php
1 <?php
2
3 /**
4 * @group large
5 * @covers Pbkdf2Password
6 * @covers Password
7 * @covers ParameterizedPassword
8 */
9 class Pbkdf2PasswordTest extends PasswordTestCase {
10 public function setUp() {
11 parent::setUp();
12 // Can't be done with annotations due to
13 // https://github.com/sebastianbergmann/phpunit/issues/3459
14 if ( !function_exists( 'hash_pbkdf2' ) ) {
15 $this->markTestSkipped( 'function hash_pbkdf2 is required' );
16 }
17 }
18
19 protected function getTypeConfigs() {
20 return [ 'pbkdf2' => [
21 'class' => Pbkdf2Password::class,
22 'algo' => 'sha256',
23 'cost' => '10000',
24 'length' => '128',
25 ] ];
26 }
27
28 public static function providePasswordTests() {
29 return [
30 [ true, ":pbkdf2:sha1:1:20:c2FsdA==:DGDID5YfDnHzqbUkr2ASBi/gN6Y=", 'password' ],
31 [ true, ":pbkdf2:sha1:2:20:c2FsdA==:6mwBTcctb4zNHtkqzh1B8NjeiVc=", 'password' ],
32 [ true, ":pbkdf2:sha1:4096:20:c2FsdA==:SwB5AbdlSJq+rUnZJvch0GWkKcE=", 'password' ],
33 [ true, ":pbkdf2:sha1:4096:16:c2EAbHQ=:Vvpqp1VICZ3MN9fwNCXgww==", "pass\x00word" ],
34 ];
35 }
36 }