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() {
|
public function testMarkRead() {
|
||||||
// no event ids to mark
|
// no event ids to mark
|
||||||
$gateway = new EchoUserNotificationGateway(
|
$gateway = new EchoUserNotificationGateway(
|
||||||
User::newFromId( 1 ),
|
$this->mockUser(),
|
||||||
$this->mockMWEchoDbFactory(),
|
$this->mockMWEchoDbFactory(),
|
||||||
$this->mockConfig()
|
$this->mockConfig()
|
||||||
);
|
);
|
||||||
|
@ -18,7 +18,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
||||||
|
|
||||||
// successful update
|
// successful update
|
||||||
$gateway = new EchoUserNotificationGateway(
|
$gateway = new EchoUserNotificationGateway(
|
||||||
User::newFromId( 1 ),
|
$this->mockUser(),
|
||||||
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
||||||
$this->mockConfig()
|
$this->mockConfig()
|
||||||
);
|
);
|
||||||
|
@ -26,7 +26,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
||||||
|
|
||||||
// unsuccessful update
|
// unsuccessful update
|
||||||
$gateway = new EchoUserNotificationGateway(
|
$gateway = new EchoUserNotificationGateway(
|
||||||
User::newFromId( 1 ),
|
$this->mockUser(),
|
||||||
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
||||||
$this->mockConfig()
|
$this->mockConfig()
|
||||||
);
|
);
|
||||||
|
@ -36,7 +36,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
||||||
public function testMarkAllRead() {
|
public function testMarkAllRead() {
|
||||||
// successful update
|
// successful update
|
||||||
$gateway = new EchoUserNotificationGateway(
|
$gateway = new EchoUserNotificationGateway(
|
||||||
User::newFromId( 1 ),
|
$this->mockUser(),
|
||||||
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
$this->mockMWEchoDbFactory( [ 'update' => true ] ),
|
||||||
$this->mockConfig()
|
$this->mockConfig()
|
||||||
);
|
);
|
||||||
|
@ -44,7 +44,7 @@ class EchoUserNotificationGatewayTest extends MediaWikiUnitTestCase {
|
||||||
|
|
||||||
// null update
|
// null update
|
||||||
$gateway = new EchoUserNotificationGateway(
|
$gateway = new EchoUserNotificationGateway(
|
||||||
User::newFromId( 1 ),
|
$this->mockUser(),
|
||||||
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
$this->mockMWEchoDbFactory( [ 'update' => false ] ),
|
||||||
$this->mockConfig()
|
$this->mockConfig()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue