*/
public function testConstructor() {
$ma = new MailAddress( 'foo@bar.baz', 'UserName', 'Real name' );
- $this->assertInstanceOf( 'MailAddress', $ma );
+ $this->assertInstanceOf( MailAddress::class, $ma );
}
/**
if ( wfIsWindows() ) {
$this->markTestSkipped( 'This test only works on non-Windows platforms' );
}
- $user = $this->getMock( 'User' );
+ $user = $this->createMock( User::class );
$user->expects( $this->any() )->method( 'getName' )->will(
$this->returnValue( 'UserName' )
);
);
$ma = MailAddress::newFromUser( $user );
- $this->assertInstanceOf( 'MailAddress', $ma );
+ $this->assertInstanceOf( MailAddress::class, $ma );
$this->setMwGlobals( 'wgEnotifUseRealName', true );
$this->assertEquals( 'Real name <foo@bar.baz>', $ma->toString() );
$this->setMwGlobals( 'wgEnotifUseRealName', false );