dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unregister hooks that interfere with unit testing
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
user
/
CentralIdLookupTest.php
diff --git
a/tests/phpunit/includes/user/CentralIdLookupTest.php
b/tests/phpunit/includes/user/CentralIdLookupTest.php
index
1786261
..
789cf08
100644
(file)
--- a/
tests/phpunit/includes/user/CentralIdLookupTest.php
+++ b/
tests/phpunit/includes/user/CentralIdLookupTest.php
@@
-1,5
+1,7
@@
<?php
<?php
+use Wikimedia\TestingAccessWrapper;
+
/**
* @covers CentralIdLookup
* @group Database
/**
* @covers CentralIdLookup
* @group Database
@@
-45,7
+47,7
@@
class CentralIdLookupTest extends MediaWikiTestCase {
$this->getMockForAbstractClass( 'CentralIdLookup' )
);
$this->getMockForAbstractClass( 'CentralIdLookup' )
);
- $user =
User::newFromName( 'UTSysop'
);
+ $user =
static::getTestSysop()->getUser(
);
$this->assertSame( $user, $mock->checkAudience( $user ) );
$user = $mock->checkAudience( CentralIdLookup::AUDIENCE_PUBLIC );
$this->assertSame( $user, $mock->checkAudience( $user ) );
$user = $mock->checkAudience( CentralIdLookup::AUDIENCE_PUBLIC );