mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 15:38:37 +00:00
a2412732f6
Adds additional job parameters to help diagnose the apparent issue of jobs being performed twice on Beta. Bug: T255068 Change-Id: Ib257a24056539487e1110fe286fa4535c3fec94a
21 lines
692 B
PHP
21 lines
692 B
PHP
<?php
|
|
|
|
use EchoPush\NotificationRequestJob;
|
|
use EchoPush\PushNotifier;
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
/** @covers \EchoPush\PushNotifier */
|
|
class PushNotifierTest extends MediaWikiIntegrationTestCase {
|
|
|
|
public function testCreateJob(): void {
|
|
$notifier = TestingAccessWrapper::newFromClass( PushNotifier::class );
|
|
$user = $this->getTestUser()->getUser();
|
|
$centralId = CentralIdLookup::factory()->centralIdFromLocalUser( $user );
|
|
$job = $notifier->createJob( $user );
|
|
$this->assertInstanceOf( NotificationRequestJob::class, $job );
|
|
$this->assertSame( 'EchoPushNotificationRequest', $job->getType() );
|
|
$this->assertSame( $centralId, $job->getParams()['centralId'] );
|
|
}
|
|
|
|
}
|