* @return LegacyHookPreAuthenticationProvider
*/
protected function getProvider() {
- $request = $this->getMock( 'FauxRequest', [ 'getIP' ] );
+ $request = $this->getMockBuilder( 'FauxRequest' )
+ ->setMethods( [ 'getIP' ] )->getMock();
$request->expects( $this->any() )->method( 'getIP' )->will( $this->returnValue( '127.0.0.42' ) );
$manager = new AuthManager(
* @return object $mock->expects( $expect )->method( ... ).
*/
protected function hook( $hook, $expect ) {
- $mock = $this->getMock( __CLASS__, [ "on$hook" ] );
+ $mock = $this->getMockBuilder( __CLASS__ )->setMethods( [ "on$hook" ] )->getMock();
$this->mergeMwGlobalArrayValue( 'wgHooks', [
$hook => [ $mock ],
] );
* @dataProvider provideTestForAccountCreation
* @param string $msg
* @param Status|null $status
- * @param StatusValue Result
+ * @param StatusValue $result Result
*/
public function testTestForAccountCreation( $msg, $status, $result ) {
$this->hook( 'AbortNewAccount', $this->once() )