mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-25 14:13:55 +00:00
8f44150300
Change-Id: I57b56d285bac4b41e81f656f3c1ddceee4620fb5
21 lines
689 B
PHP
21 lines
689 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Notifications\Services;
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
/** @covers \MediaWiki\Extension\Notifications\Push\NotificationServiceClient */
|
|
class NotificationServiceClientTest extends MediaWikiIntegrationTestCase {
|
|
use MockHttpTrait;
|
|
|
|
public function testConstructRequest(): void {
|
|
$this->installMockHttp( 'hi' );
|
|
|
|
$client = Services::getInstance()->getPushNotificationServiceClient();
|
|
$client = TestingAccessWrapper::newFromObject( $client );
|
|
$payload = [ 'deviceTokens' => [ 'foo' ], 'messageType' => 'checkEchoV1' ];
|
|
$request = $client->constructRequest( 'fcm', $payload );
|
|
$this->assertInstanceOf( MWHttpRequest::class, $request );
|
|
}
|
|
|
|
}
|