mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Use new ResourceLoader namespace
Extensions using Phan need to be updated simultaneously with core due to T308443. Bug: T308718 Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659 Change-Id: I47dad71df97f38c55550f71baf6dae67dbe0a2ba
This commit is contained in:
parent
1310fbf645
commit
3a0c4b1f3e
|
@ -24,18 +24,17 @@ namespace MediaWiki\Extension\CodeMirror;
|
|||
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use ResourceLoader;
|
||||
use ResourceLoaderContext;
|
||||
use ResourceLoaderFileModule;
|
||||
use MediaWiki\ResourceLoader as RL;
|
||||
use MediaWiki\ResourceLoader\ResourceLoader;
|
||||
|
||||
/**
|
||||
* ResourceLoader module for ext.CodeMirror
|
||||
*/
|
||||
class ResourceLoaderCodeMirrorModule extends ResourceLoaderFileModule {
|
||||
class ResourceLoaderCodeMirrorModule extends RL\FileModule {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getScript( ResourceLoaderContext $context ) {
|
||||
public function getScript( RL\Context $context ) {
|
||||
return ResourceLoader::makeConfigSetScript(
|
||||
[ 'extCodeMirrorConfig' => $this->getFrontendConfiguraton() ]
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace MediaWiki\Extension\CodeMirror\Tests;
|
||||
|
||||
use MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule;
|
||||
use ResourceLoaderContext;
|
||||
use MediaWiki\ResourceLoader\Context;
|
||||
|
||||
/**
|
||||
* @covers \MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule
|
||||
|
@ -11,7 +11,7 @@ use ResourceLoaderContext;
|
|||
class ResourceLoaderCodeMirrorModuleTest extends \MediaWikiIntegrationTestCase {
|
||||
|
||||
public function testResourceLoaderModule() {
|
||||
$context = $this->createMock( ResourceLoaderContext::class );
|
||||
$context = $this->createMock( Context::class );
|
||||
$module = new ResourceLoaderCodeMirrorModule();
|
||||
|
||||
$this->assertFalse( $module->supportsURLLoading() );
|
||||
|
|
Loading…
Reference in a new issue