mediawiki-extensions-Echo/tests/phpunit/Api/Push/ApiEchoPushSubscriptionsTest.php
Reedy 38a9330753 Namespace Api classes
Change-Id: I414234f10c16b8ccaa7ddbaf8e9033e70dfceab8
2022-10-03 00:05:21 +01:00

23 lines
516 B
PHP

<?php
/**
* @group medium
* @group API
* @covers \MediaWiki\Extension\Notifications\Push\Api\ApiEchoPushSubscriptions
*/
class ApiEchoPushSubscriptionsTest extends ApiTestCase {
public function testRequiresToken(): void {
$this->setMwGlobals( 'wgEchoEnablePush', true );
$params = [
'action' => 'echopushsubscriptions',
'command' => 'create',
'platform' => 'apns',
'platformtoken' => 'ABC123',
];
$this->expectException( ApiUsageException::class );
$this->doApiRequest( $params );
}
}