mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 07:26:29 +00:00
c76761eff3
Bug: T305667 Change-Id: I5a7846a0fc383bddbf6511d6ba73c8be7d7760c7
22 lines
802 B
PHP
22 lines
802 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Notifications\Push\NotificationRequestJob;
|
|
use MediaWiki\Extension\Notifications\Push\PushNotifier;
|
|
use MediaWiki\Extension\Notifications\Push\Utils;
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
/** @covers \MediaWiki\Extension\Notifications\Push\PushNotifier */
|
|
class PushNotifierTest extends MediaWikiIntegrationTestCase {
|
|
|
|
public function testCreateJob(): void {
|
|
$notifier = TestingAccessWrapper::newFromClass( PushNotifier::class );
|
|
$user = $this->getTestUser()->getUser();
|
|
$centralId = Utils::getPushUserId( $user );
|
|
$job = $notifier->createJob( $user );
|
|
$this->assertInstanceOf( NotificationRequestJob::class, $job );
|
|
$this->assertSame( 'EchoPushNotificationRequest', $job->getType() );
|
|
$this->assertSame( $centralId, $job->getParams()['centralId'] );
|
|
}
|
|
|
|
}
|