mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-01 02:46:46 +00:00
596729d852
Adds AttributeManager to EchoServices so that dependencies of AttributeManager can be injected. Bug: T275148 Change-Id: I4fa5084d72914d16b6d218e7dd3521f5a1919b80
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?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 );
|
|
}
|
|
|
|
public function testGetAttributeManager(): void {
|
|
$attributeManager = $this->echoServices->getAttributeManager();
|
|
$this->assertInstanceOf( EchoAttributeManager::class, $attributeManager );
|
|
}
|
|
|
|
}
|