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