mediawiki-extensions-Echo/tests/phpunit/integration/EchoServicesTest.php
Reedy c76761eff3 Move EchoPush namespace to MediaWiki\Extension\Notifications\Push
Bug: T305667
Change-Id: I5a7846a0fc383bddbf6511d6ba73c8be7d7760c7
2022-04-25 13:56:09 +01:00

39 lines
1.2 KiB
PHP

<?php
use MediaWiki\Extension\Notifications\Push\NotificationServiceClient;
use MediaWiki\Extension\Notifications\Push\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 );
}
public function testGetAttributeManager(): void {
$attributeManager = $this->echoServices->getAttributeManager();
$this->assertInstanceOf( EchoAttributeManager::class, $attributeManager );
}
}