diff options
Diffstat (limited to 'tests/phpunit/includes/session')
-rw-r--r-- | tests/phpunit/includes/session/UserInfoTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/phpunit/includes/session/UserInfoTest.php b/tests/phpunit/includes/session/UserInfoTest.php index ef786b85a7d5..3138b6a4ce44 100644 --- a/tests/phpunit/includes/session/UserInfoTest.php +++ b/tests/phpunit/includes/session/UserInfoTest.php @@ -8,7 +8,7 @@ use MediaWikiIntegrationTestCase; /** * @group Session * @group Database - * @covers MediaWiki\Session\UserInfo + * @covers \MediaWiki\Session\UserInfo */ class UserInfoTest extends MediaWikiIntegrationTestCase { @@ -26,7 +26,10 @@ class UserInfoTest extends MediaWikiIntegrationTestCase { } public function testNewFromId() { - $id = wfGetDB( DB_PRIMARY )->selectField( 'user', 'MAX(user_id)' ) + 1; + $id = $this->getDb()->newSelectQueryBuilder() + ->select( 'MAX(user_id)' ) + ->from( 'user' ) + ->fetchField() + 1; try { UserInfo::newFromId( $id ); $this->fail( 'Expected exception not thrown' ); |