2020-05-15 17:19:03 +00:00
|
|
|
<?php
|
|
|
|
|
2022-04-08 00:38:27 +00:00
|
|
|
use MediaWiki\Extension\Notifications\Push\NotificationServiceClient;
|
|
|
|
use MediaWiki\Extension\Notifications\Push\SubscriptionManager;
|
2020-05-22 22:02:34 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
2020-05-15 17:19:03 +00:00
|
|
|
|
|
|
|
/** @covers EchoServices */
|
|
|
|
class EchoServicesTest extends MediaWikiIntegrationTestCase {
|
|
|
|
|
2020-05-22 22:02:34 +00:00
|
|
|
/** @var EchoServices */
|
|
|
|
private $echoServices;
|
|
|
|
|
2022-09-29 13:41:35 +00:00
|
|
|
protected function setUp(): void {
|
2020-05-22 22:02:34 +00:00
|
|
|
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();
|
2020-05-15 17:19:03 +00:00
|
|
|
$this->assertInstanceOf( SubscriptionManager::class, $subscriptionManager );
|
|
|
|
}
|
|
|
|
|
2021-02-25 01:55:40 +00:00
|
|
|
public function testGetAttributeManager(): void {
|
|
|
|
$attributeManager = $this->echoServices->getAttributeManager();
|
|
|
|
$this->assertInstanceOf( EchoAttributeManager::class, $attributeManager );
|
|
|
|
}
|
|
|
|
|
2020-05-15 17:19:03 +00:00
|
|
|
}
|