mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-04 12:18:30 +00:00
20 lines
451 B
PHP
20 lines
451 B
PHP
|
<?php
|
||
|
|
||
|
use EchoPush\Utils;
|
||
|
|
||
|
/** @covers EchoPush\Utils */
|
||
|
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 ) );
|
||
|
}
|
||
|
|
||
|
}
|