blob: 1e60f230d834aef4e611ef7b10b96002041a40cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?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'] );
}
}
|