2020-05-15 17:19:03 +00:00
|
|
|
<?php
|
|
|
|
|
2022-11-13 07:53:42 +00:00
|
|
|
namespace MediaWiki\Extension\Notifications\Test\Integration;
|
|
|
|
|
2022-11-12 07:19:00 +00:00
|
|
|
use MediaWiki\Extension\Notifications\AttributeManager;
|
2022-04-08 00:38:27 +00:00
|
|
|
use MediaWiki\Extension\Notifications\Push\NotificationServiceClient;
|
|
|
|
use MediaWiki\Extension\Notifications\Push\SubscriptionManager;
|
2022-11-13 07:53:42 +00:00
|
|
|
use MediaWiki\Extension\Notifications\Services;
|
|
|
|
use MediaWikiIntegrationTestCase;
|
2020-05-15 17:19:03 +00:00
|
|
|
|
2023-08-04 00:31:24 +00:00
|
|
|
/**
|
2022-11-13 07:53:42 +00:00
|
|
|
* @covers \MediaWiki\Extension\Notifications\Services
|
2023-08-04 00:31:24 +00:00
|
|
|
* @group Database
|
|
|
|
*/
|
2022-11-13 07:53:42 +00:00
|
|
|
class ServicesTest extends MediaWikiIntegrationTestCase {
|
2020-05-15 17:19:03 +00:00
|
|
|
|
2020-05-22 22:02:34 +00:00
|
|
|
public function testWrap(): void {
|
2023-11-09 20:16:38 +00:00
|
|
|
$services = Services::wrap( $this->getServiceContainer() );
|
2022-11-13 07:53:42 +00:00
|
|
|
$this->assertInstanceOf( Services::class, $services );
|
2020-05-22 22:02:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetPushNotificationServiceClient(): void {
|
2024-06-26 09:27:22 +00:00
|
|
|
$serviceClient = Services::getInstance()->getPushNotificationServiceClient();
|
2020-05-22 22:02:34 +00:00
|
|
|
$this->assertInstanceOf( NotificationServiceClient::class, $serviceClient );
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetPushSubscriptionManager(): void {
|
2024-06-26 09:27:22 +00:00
|
|
|
$subscriptionManager = Services::getInstance()->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 {
|
2024-06-26 09:27:22 +00:00
|
|
|
$attributeManager = Services::getInstance()->getAttributeManager();
|
2022-11-12 07:19:00 +00:00
|
|
|
$this->assertInstanceOf( AttributeManager::class, $attributeManager );
|
2021-02-25 01:55:40 +00:00
|
|
|
}
|
|
|
|
|
2020-05-15 17:19:03 +00:00
|
|
|
}
|