mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-24 13:44:40 +00:00
e87cf704f4
There is no guarantee the MediaWikiServices instance is still valid. Other tests can reset it. Bug: T368390 Change-Id: I92de60b2ba5fb66af957a800ce85773db58303cc
38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications\Test\Integration;
|
|
|
|
use MediaWiki\Extension\Notifications\AttributeManager;
|
|
use MediaWiki\Extension\Notifications\Push\NotificationServiceClient;
|
|
use MediaWiki\Extension\Notifications\Push\SubscriptionManager;
|
|
use MediaWiki\Extension\Notifications\Services;
|
|
use MediaWikiIntegrationTestCase;
|
|
|
|
/**
|
|
* @covers \MediaWiki\Extension\Notifications\Services
|
|
* @group Database
|
|
*/
|
|
class ServicesTest extends MediaWikiIntegrationTestCase {
|
|
|
|
public function testWrap(): void {
|
|
$services = Services::wrap( $this->getServiceContainer() );
|
|
$this->assertInstanceOf( Services::class, $services );
|
|
}
|
|
|
|
public function testGetPushNotificationServiceClient(): void {
|
|
$serviceClient = Services::getInstance()->getPushNotificationServiceClient();
|
|
$this->assertInstanceOf( NotificationServiceClient::class, $serviceClient );
|
|
}
|
|
|
|
public function testGetPushSubscriptionManager(): void {
|
|
$subscriptionManager = Services::getInstance()->getPushSubscriptionManager();
|
|
$this->assertInstanceOf( SubscriptionManager::class, $subscriptionManager );
|
|
}
|
|
|
|
public function testGetAttributeManager(): void {
|
|
$attributeManager = Services::getInstance()->getAttributeManager();
|
|
$this->assertInstanceOf( AttributeManager::class, $attributeManager );
|
|
}
|
|
|
|
}
|