mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-22 20:53:03 +00:00
291ea47dd3
This might make dependencies easier to find. Change-Id: I158fd9f63f18a2b8da0368ac95d5fb5aa9bca3ff
26 lines
637 B
PHP
26 lines
637 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications\Test\Integration\Push;
|
|
|
|
use MediaWiki\Extension\Notifications\Push\Utils;
|
|
use MediaWikiIntegrationTestCase;
|
|
|
|
/**
|
|
* @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 ) );
|
|
}
|
|
|
|
}
|