mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 10:52:27 +00:00
c76761eff3
Bug: T305667 Change-Id: I5a7846a0fc383bddbf6511d6ba73c8be7d7760c7
20 lines
645 B
PHP
20 lines
645 B
PHP
<?php
|
|
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
/** @covers \MediaWiki\Extension\Notifications\Push\NotificationServiceClient */
|
|
class NotificationServiceClientTest extends MediaWikiIntegrationTestCase {
|
|
use MockHttpTrait;
|
|
|
|
public function testConstructRequest(): void {
|
|
$this->installMockHttp( 'hi' );
|
|
|
|
$client = EchoServices::getInstance()->getPushNotificationServiceClient();
|
|
$client = TestingAccessWrapper::newFromObject( $client );
|
|
$payload = [ 'deviceTokens' => [ 'foo' ], 'messageType' => 'checkEchoV1' ];
|
|
$request = $client->constructRequest( 'fcm', $payload );
|
|
$this->assertInstanceOf( MWHttpRequest::class, $request );
|
|
}
|
|
|
|
}
|