mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-24 06:13:31 +00:00
22 lines
526 B
PHP
22 lines
526 B
PHP
|
<?php
|
||
|
|
||
|
namespace CodeMirror\Tests;
|
||
|
|
||
|
use MediaWikiTestCase;
|
||
|
use RequestContext;
|
||
|
|
||
|
/**
|
||
|
* @group CodeMirror
|
||
|
*/
|
||
|
class HookTest extends MediaWikiTestCase {
|
||
|
/**
|
||
|
* @covers CodeMirrorHooks::onGetPreferences()
|
||
|
*/
|
||
|
public function testPreferenceRegistered() {
|
||
|
$user = self::getTestUser()->getUser();
|
||
|
$this->setMwGlobals( 'wgTitle', \Title::newFromText( __METHOD__ ) );
|
||
|
$kinds = $user->getOptionKinds( RequestContext::getMain(), [ 'usecodemirror' => 1 ] );
|
||
|
self::assertEquals( 'registered', $kinds['usecodemirror'] );
|
||
|
}
|
||
|
}
|