diff options
Diffstat (limited to 'Echo/tests/phpunit/NotifUserTest.php')
-rw-r--r-- | Echo/tests/phpunit/NotifUserTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Echo/tests/phpunit/NotifUserTest.php b/Echo/tests/phpunit/NotifUserTest.php index b25f3dc5..11a182d3 100644 --- a/Echo/tests/phpunit/NotifUserTest.php +++ b/Echo/tests/phpunit/NotifUserTest.php @@ -3,7 +3,7 @@ use MediaWiki\MediaWikiServices; /** - * @covers MWEchoNotifUser + * @covers \MWEchoNotifUser * @group Echo */ class MWEchoNotifUserTest extends MediaWikiTestCase { @@ -13,7 +13,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { */ private $cache; - protected function setUp() { + protected function setUp() : void { parent::setUp(); $this->cache = new WANObjectCache( [ 'cache' => MediaWikiServices::getInstance()->getMainObjectStash(), @@ -32,7 +32,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { $this->assertTrue( $exception, "Got exception" ); $notifUser = MWEchoNotifUser::newFromUser( User::newFromId( 2 ) ); - $this->assertInstanceOf( 'MWEchoNotifUser', $notifUser ); + $this->assertInstanceOf( MWEchoNotifUser::class, $notifUser ); } public function testGetEmailFormat() { @@ -113,7 +113,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { $dbResult += [ 'markRead' => true ]; - $gateway = $this->getMockBuilder( 'EchoUserNotificationGateway' ) + $gateway = $this->getMockBuilder( EchoUserNotificationGateway::class ) ->disableOriginalConstructor() ->getMock(); $gateway->expects( $this->any() ) @@ -122,7 +122,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { $gateway->expects( $this->any() ) ->method( 'getDB' ) ->will( $this->returnValue( - $this->getMockBuilder( Database::class ) + $this->getMockBuilder( IDatabase::class ) ->disableOriginalConstructor()->getMock() ) ); @@ -130,7 +130,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { } public function mockEchoNotificationMapper( array $result = [] ) { - $mapper = $this->getMockBuilder( 'EchoNotificationMapper' ) + $mapper = $this->getMockBuilder( EchoNotificationMapper::class ) ->disableOriginalConstructor() ->getMock(); $mapper->expects( $this->any() ) @@ -147,7 +147,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { } protected function mockEchoNotification() { - $notification = $this->getMockBuilder( 'EchoNotification' ) + $notification = $this->getMockBuilder( EchoNotification::class ) ->disableOriginalConstructor() ->getMock(); $notification->expects( $this->any() ) @@ -158,7 +158,7 @@ class MWEchoNotifUserTest extends MediaWikiTestCase { } protected function mockEchoEvent() { - $event = $this->getMockBuilder( 'EchoEvent' ) + $event = $this->getMockBuilder( EchoEvent::class ) ->disableOriginalConstructor() ->getMock(); $event->expects( $this->any() ) |