mediawiki-extensions-Echo/tests/phpunit/integration/EchoServicesTest.php
Thiemo Kreuz db79d76d83 Use PHPUnit's shortcuts where it makes sense
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
2022-10-26 11:53:57 +02: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;
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 );
}
}