mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2025-01-09 13:24:41 +00:00
17 lines
560 B
PHP
17 lines
560 B
PHP
|
<?php
|
||
|
|
||
|
use Wikimedia\TestingAccessWrapper;
|
||
|
|
||
|
/** @covers \EchoPush\NotificationServiceClient */
|
||
|
class NotificationServiceClientTest extends MediaWikiIntegrationTestCase {
|
||
|
|
||
|
public function testConstructRequest(): void {
|
||
|
$client = EchoServices::getInstance()->getPushNotificationServiceClient();
|
||
|
$client = TestingAccessWrapper::newFromObject( $client );
|
||
|
$payload = [ 'deviceTokens' => [ 'foo' ], 'messageType' => 'checkEchoV1' ];
|
||
|
$request = $client->constructRequest( 'fcm', $payload );
|
||
|
$this->assertInstanceOf( MWHttpRequest::class, $request );
|
||
|
}
|
||
|
|
||
|
}
|