mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 02:40:50 +00:00
Merge "UserNotificationGatewayTest: Mock User objects"
This commit is contained in:
commit
e76c0b23a9
|
@ -10,7 +10,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
|||
public function testMarkRead() {
|
||||
// no event ids to mark
|
||||
$gateway = new EchoUserNotificationGateway(
|
||||
User::newFromId( 1 ),
|
||||
$this->mockUser(),
|
||||
$this->mockMWEchoDbFactory(),
|
||||
$this->mockConfig()
|
||||
);
|
||||
|
@ -18,7 +18,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
|||
|
||||
// successful update
|
||||
$gateway = new EchoUserNotificationGateway(
|
||||
User::newFromId( 1 ),
|
||||
$this->mockUser(),
|
||||
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
||||
$this->mockConfig()
|
||||
);
|
||||
|
@ -26,7 +26,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
|||
|
||||
// unsuccessful update
|
||||
$gateway = new EchoUserNotificationGateway(
|
||||
User::newFromId( 1 ),
|
||||
$this->mockUser(),
|
||||
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
||||
$this->mockConfig()
|
||||
);
|
||||
|
@ -36,7 +36,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
|||
public function testMarkAllRead() {
|
||||
// successful update
|
||||
$gateway = new EchoUserNotificationGateway(
|
||||
User::newFromId( 1 ),
|
||||
$this->mockUser(),
|
||||
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
||||
$this->mockConfig()
|
||||
);
|
||||
|
@ -44,7 +44,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
|||
|
||||
// null update
|
||||
$gateway = new EchoUserNotificationGateway(
|
||||
User::newFromId( 1 ),
|
||||
$this->mockUser(),
|
||||
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
||||
$this->mockConfig()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue