mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 15:38:37 +00:00
0d8422a569
Use mocks where that makes sense, and add `@group Database` otherwise. Change-Id: I8f8ec8f4b2c73066cc8e7a6f8e38b3fc286a1070
23 lines
535 B
PHP
23 lines
535 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Notifications\Push\Utils;
|
|
|
|
/**
|
|
* @covers \MediaWiki\Extension\Notifications\Push\Utils
|
|
* @group Database
|
|
*/
|
|
class UtilsTest extends MediaWikiIntegrationTestCase {
|
|
|
|
public function testGetLoggedInPushId(): void {
|
|
$user = $this->getTestUser()->getUser();
|
|
$this->assertGreaterThan( 0, Utils::getPushUserId( $user ) );
|
|
}
|
|
|
|
public function testGetLoggedOutPushId(): void {
|
|
$user = $this->getTestUser()->getUser();
|
|
$user->doLogout();
|
|
$this->assertSame( 0, Utils::getPushUserId( $user ) );
|
|
}
|
|
|
|
}
|