summaryrefslogtreecommitdiff
blob: 60c46855b165b53edd2de5e723eb9e7cc2bf379a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 );
	}

}