Unregister hooks that interfere with unit testing
[lhc/web/wiklou.git] / tests / phpunit / includes / user / CentralIdLookupTest.php
index 1786261..789cf08 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * @covers CentralIdLookup
  * @group Database
@@ -45,7 +47,7 @@ class CentralIdLookupTest extends MediaWikiTestCase {
                        $this->getMockForAbstractClass( 'CentralIdLookup' )
                );
 
-               $user = User::newFromName( 'UTSysop' );
+               $user = static::getTestSysop()->getUser();
                $this->assertSame( $user, $mock->checkAudience( $user ) );
 
                $user = $mock->checkAudience( CentralIdLookup::AUDIENCE_PUBLIC );