wiki.techinc.nl/tests/phpunit/includes/password/MWSaltedPasswordTest.php
Tim Starling a9911b2582 Improve test coverage in includes/password
From 21% to 82%.

* Added missing @covers, broadened @covers where appropriate.
* Added tests for some code that lacked them.
* Added a parameter to control the use of hash_pbkdf2() so that the pure
  PHP fallback could be tested. In the non-fallback test, force the use
  of the extension, and mark it skipped if it is not installed.

Bug: T167003
Change-Id: I987e1a89ec343907f4ead7f6192b2d4deb58ac16
2017-06-07 14:28:11 +10:00

21 lines
463 B
PHP

<?php
/**
* @covers MWSaltedPassword
* @covers ParameterizedPassword
* @covers Password
*/
class MWSaltedPasswordTest extends PasswordTestCase {
protected function getTypeConfigs() {
return [ 'B' => [
'class' => 'MWSaltedPassword',
] ];
}
public static function providePasswordTests() {
return [
[ true, ':B:salt:9842afc7cb949c440c51347ed809362f', 'password' ],
[ false, ':B:salt:d529e941509eb9e9b9cfaeae1fe7ca23', 'password' ],
];
}
}