mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
Merge "Don't hold reference to MediaWikiServices instance in tests"
This commit is contained in:
commit
b6868dbe70
|
@ -14,31 +14,23 @@ use MediaWikiIntegrationTestCase;
|
|||
*/
|
||||
class ServicesTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/** @var Services */
|
||||
private $echoServices;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->echoServices = Services::getInstance();
|
||||
}
|
||||
|
||||
public function testWrap(): void {
|
||||
$services = Services::wrap( $this->getServiceContainer() );
|
||||
$this->assertInstanceOf( Services::class, $services );
|
||||
}
|
||||
|
||||
public function testGetPushNotificationServiceClient(): void {
|
||||
$serviceClient = $this->echoServices->getPushNotificationServiceClient();
|
||||
$serviceClient = Services::getInstance()->getPushNotificationServiceClient();
|
||||
$this->assertInstanceOf( NotificationServiceClient::class, $serviceClient );
|
||||
}
|
||||
|
||||
public function testGetPushSubscriptionManager(): void {
|
||||
$subscriptionManager = $this->echoServices->getPushSubscriptionManager();
|
||||
$subscriptionManager = Services::getInstance()->getPushSubscriptionManager();
|
||||
$this->assertInstanceOf( SubscriptionManager::class, $subscriptionManager );
|
||||
}
|
||||
|
||||
public function testGetAttributeManager(): void {
|
||||
$attributeManager = $this->echoServices->getAttributeManager();
|
||||
$attributeManager = Services::getInstance()->getAttributeManager();
|
||||
$this->assertInstanceOf( AttributeManager::class, $attributeManager );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue