diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/phpunit/includes/mail/EmailNotificationTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/phpunit/includes/mail/EmailNotificationTest.php b/tests/phpunit/includes/mail/EmailNotificationTest.php index 4718b635947b..70061b93da80 100644 --- a/tests/phpunit/includes/mail/EmailNotificationTest.php +++ b/tests/phpunit/includes/mail/EmailNotificationTest.php @@ -37,19 +37,20 @@ class EmailNotificationTest extends MediaWikiIntegrationTestCase { 'rc_timestamp' => '20200624000000', 'rc_comment' => '', 'rc_minor' => false, - + 'rc_title' => $title->getDBkey(), + 'rc_namespace' => $title->getNamespace(), 'rc_deleted' => false, 'rc_last_oldid' => false, 'rc_user' => $alice->getId(), ]; $rc = @RecentChange::newFromRow( $row ); - $sent = $this->emailNotification->notifyOnPageChange( $alice, $title, $rc ); + $sent = $this->emailNotification->notifyOnPageChange( $rc ); static::assertTrue( $sent ); // Alice edits again, but Bob shouldn't be notified again // (only one email until Bob visits the page again). - $sent = $this->emailNotification->notifyOnPageChange( $alice, $title, $rc ); + $sent = $this->emailNotification->notifyOnPageChange( $rc ); static::assertFalse( $sent ); // Reset notification timestamp, simulating that Bob visited the page. @@ -60,7 +61,7 @@ class EmailNotificationTest extends MediaWikiIntegrationTestCase { $store->addWatch( $bob, $title, '20060123000000' ); // Alice edits again, email should not be sent. - $sent = $this->emailNotification->notifyOnPageChange( $alice, $title, $rc ); + $sent = $this->emailNotification->notifyOnPageChange( $rc ); static::assertFalse( $sent ); } } |