mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2025-01-07 12:24:35 +00:00
e03f7c3e82
Also use MainConfigNames. Change-Id: I80d6b3ef9d7b857e35d8f93f424db1cfca1301f6
25 lines
559 B
PHP
25 lines
559 B
PHP
<?php
|
|
|
|
use MediaWiki\Tests\Api\ApiTestCase;
|
|
|
|
/**
|
|
* @group medium
|
|
* @group API
|
|
* @covers \MediaWiki\Extension\Notifications\Push\Api\ApiEchoPushSubscriptions
|
|
*/
|
|
class ApiEchoPushSubscriptionsTest extends ApiTestCase {
|
|
|
|
public function testRequiresToken(): void {
|
|
$this->overrideConfigValue( 'EchoEnablePush', true );
|
|
$params = [
|
|
'action' => 'echopushsubscriptions',
|
|
'command' => 'create',
|
|
'platform' => 'apns',
|
|
'platformtoken' => 'ABC123',
|
|
];
|
|
$this->expectException( ApiUsageException::class );
|
|
$this->doApiRequest( $params );
|
|
}
|
|
|
|
}
|