mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 13:56:44 +00:00
Avoid wgTitle in tests
Change-Id: I1323b9b9542598d33f7150cc0d468e581b0d8c09
This commit is contained in:
parent
7002bc434d
commit
b4b1004499
|
@ -71,9 +71,10 @@ class HookTest extends MediaWikiIntegrationTestCase {
|
|||
*/
|
||||
public function testPreferenceRegistered() {
|
||||
$user = self::getTestUser()->getUser();
|
||||
$this->setMwGlobals( 'wgTitle', Title::newFromText( __METHOD__ ) );
|
||||
$context = RequestContext::getMain();
|
||||
$context->setTitle( Title::newFromText( __METHOD__ ) );
|
||||
$kinds = $this->getServiceContainer()->getUserOptionsManager()
|
||||
->getOptionKinds( $user, RequestContext::getMain(), [ 'usecodemirror' => 1 ] );
|
||||
->getOptionKinds( $user, $context, [ 'usecodemirror' => 1 ] );
|
||||
self::assertEquals( 'registered', $kinds['usecodemirror'] );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue