mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-12 16:05:33 +00:00
291ea47dd3
This might make dependencies easier to find. Change-Id: I158fd9f63f18a2b8da0368ac95d5fb5aa9bca3ff
28 lines
651 B
PHP
28 lines
651 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications\Test\API;
|
|
|
|
use MediaWiki\Api\ApiUsageException;
|
|
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 );
|
|
}
|
|
|
|
}
|