/**
* @group AuthManager
- * @covers MediaWiki\Auth\AuthenticationRequest
+ * @covers \MediaWiki\Auth\AuthenticationRequest
*/
class AuthenticationRequestTest extends \MediaWikiTestCase {
public function testBasics() {
$ret = $mock->describeCredentials();
$this->assertInternalType( 'array', $ret );
$this->assertArrayHasKey( 'provider', $ret );
- $this->assertInstanceOf( 'Message', $ret['provider'] );
+ $this->assertInstanceOf( \Message::class, $ret['provider'] );
$this->assertArrayHasKey( 'account', $ret );
- $this->assertInstanceOf( 'Message', $ret['account'] );
+ $this->assertInstanceOf( \Message::class, $ret['account'] );
}
public function testLoadRequestsFromSubmission() {
public function testMergeFieldInfo() {
$msg = wfMessage( 'foo' );
- $req1 = $this->getMock( AuthenticationRequest::class );
+ $req1 = $this->createMock( AuthenticationRequest::class );
$req1->required = AuthenticationRequest::REQUIRED;
$req1->expects( $this->any() )->method( 'getFieldInfo' )->will( $this->returnValue( [
'string1' => [
],
] ) );
- $req2 = $this->getMock( AuthenticationRequest::class );
+ $req2 = $this->createMock( AuthenticationRequest::class );
$req2->required = AuthenticationRequest::REQUIRED;
$req2->expects( $this->any() )->method( 'getFieldInfo' )->will( $this->returnValue( [
'string1' => [
],
] ) );
- $req3 = $this->getMock( AuthenticationRequest::class );
+ $req3 = $this->createMock( AuthenticationRequest::class );
$req3->required = AuthenticationRequest::REQUIRED;
$req3->expects( $this->any() )->method( 'getFieldInfo' )->will( $this->returnValue( [
'string1' => [
],
] ) );
- $req4 = $this->getMock( AuthenticationRequest::class );
+ $req4 = $this->createMock( AuthenticationRequest::class );
$req4->required = AuthenticationRequest::REQUIRED;
$req4->expects( $this->any() )->method( 'getFieldInfo' )->will( $this->returnValue( [] ) );