wiki.techinc.nl/tests/phpunit/unit/includes/password/MWOldPasswordTest.php
Reedy 5ab70409f5 Namespace includes/password
Bug: T353458
Change-Id: I1a701b5b7ff65356692abb0efde9a2207b6135b6
2024-05-18 16:17:38 +01:00

26 lines
746 B
PHP

<?php
use MediaWiki\Password\MWOldPassword;
/**
* @covers \MediaWiki\Password\MWOldPassword
* @covers \MediaWiki\Password\ParameterizedPassword
* @covers \MediaWiki\Password\Password
*/
class MWOldPasswordTest extends PasswordTestCase {
protected function getTypeConfigs() {
return [ 'A' => [
'class' => MWOldPassword::class,
] ];
}
public static function providePasswordTests() {
return [
[ true, ':A:5f4dcc3b5aa765d61d8327deb882cf99', 'password' ],
// Type-B password with incorrect type name is accepted
[ true, ':A:salt:9842afc7cb949c440c51347ed809362f', 'password' ],
[ false, ':A:d529e941509eb9e9b9cfaeae1fe7ca23', 'password' ],
[ false, ':A:salt:d529e941509eb9e9b9cfaeae1fe7ca23', 'password' ],
];
}
}