diff options
Diffstat (limited to 'Echo/tests/phpunit/integration/Push/NotificationServiceClientTest.php')
-rw-r--r-- | Echo/tests/phpunit/integration/Push/NotificationServiceClientTest.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Echo/tests/phpunit/integration/Push/NotificationServiceClientTest.php b/Echo/tests/phpunit/integration/Push/NotificationServiceClientTest.php new file mode 100644 index 00000000..26cb868d --- /dev/null +++ b/Echo/tests/phpunit/integration/Push/NotificationServiceClientTest.php @@ -0,0 +1,16 @@ +<?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 ); + } + +} |