mediawiki-extensions-Echo/tests/phpunit/integration/Push/UtilsTest.php
James D. Forrester 291ea47dd3 tests: Namespace the PHP classes
This might make dependencies easier to find.

Change-Id: I158fd9f63f18a2b8da0368ac95d5fb5aa9bca3ff
2024-10-03 20:30:06 +00:00

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 ) );
}
}