summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Echo/tests/phpunit/integration/EchoServicesTest.php')
-rw-r--r--Echo/tests/phpunit/integration/EchoServicesTest.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/Echo/tests/phpunit/integration/EchoServicesTest.php b/Echo/tests/phpunit/integration/EchoServicesTest.php
new file mode 100644
index 00000000..60c46855
--- /dev/null
+++ b/Echo/tests/phpunit/integration/EchoServicesTest.php
@@ -0,0 +1,33 @@
+<?php
+
+use EchoPush\NotificationServiceClient;
+use EchoPush\SubscriptionManager;
+use MediaWiki\MediaWikiServices;
+
+/** @covers EchoServices */
+class EchoServicesTest extends MediaWikiIntegrationTestCase {
+
+ /** @var EchoServices */
+ private $echoServices;
+
+ public function setUp(): void {
+ parent::setUp();
+ $this->echoServices = EchoServices::getInstance();
+ }
+
+ public function testWrap(): void {
+ $services = EchoServices::wrap( MediaWikiServices::getInstance() );
+ $this->assertInstanceOf( EchoServices::class, $services );
+ }
+
+ public function testGetPushNotificationServiceClient(): void {
+ $serviceClient = $this->echoServices->getPushNotificationServiceClient();
+ $this->assertInstanceOf( NotificationServiceClient::class, $serviceClient );
+ }
+
+ public function testGetPushSubscriptionManager(): void {
+ $subscriptionManager = $this->echoServices->getPushSubscriptionManager();
+ $this->assertInstanceOf( SubscriptionManager::class, $subscriptionManager );
+ }
+
+}