mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-01 02:46:46 +00:00
db79d76d83
Notably: any() is the default anyway. It doesn't really make the tests more specific or better readable when we repeat it all the time. Change-Id: I56d201bfce454587b00015b7208f313dd8ed9624
39 lines
1.2 KiB
PHP
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;
|
|
|
|
protected 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 );
|
|
}
|
|
|
|
}
|