Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiTestCaseTrait.php
1 <?php
2
3 /**
4 * For code common to both MediaWikiUnitTestCase and MediaWikiIntegrationTestCase.
5 */
6 trait MediaWikiTestCaseTrait {
7 /**
8 * Returns a PHPUnit constraint that matches anything other than a fixed set of values. This can
9 * be used to whitelist values, e.g.
10 * $mock->expects( $this->never() )->method( $this->anythingBut( 'foo', 'bar' ) );
11 * which will throw if any unexpected method is called.
12 *
13 * @param mixed ...$values Values that are not matched
14 */
15 protected function anythingBut( ...$values ) {
16 return $this->logicalNot( $this->logicalOr(
17 ...array_map( [ $this, 'matches' ], $values )
18 ) );
19 }
20 }