mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-24 03:23:14 +00:00
3a0c4b1f3e
Extensions using Phan need to be updated simultaneously with core due to T308443. Bug: T308718 Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659 Change-Id: I47dad71df97f38c55550f71baf6dae67dbe0a2ba
32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\CodeMirror\Tests;
|
|
|
|
use MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule;
|
|
use MediaWiki\ResourceLoader\Context;
|
|
|
|
/**
|
|
* @covers \MediaWiki\Extension\CodeMirror\ResourceLoaderCodeMirrorModule
|
|
*/
|
|
class ResourceLoaderCodeMirrorModuleTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
public function testResourceLoaderModule() {
|
|
$context = $this->createMock( Context::class );
|
|
$module = new ResourceLoaderCodeMirrorModule();
|
|
|
|
$this->assertFalse( $module->supportsURLLoading() );
|
|
$this->assertTrue( $module->enableModuleContentVersion() );
|
|
|
|
$script = $module->getScript( $context );
|
|
$this->assertStringContainsString( '"extCodeMirrorConfig":', $script );
|
|
$this->assertStringContainsString( '"pluginModules":', $script );
|
|
$this->assertStringContainsString( '"tagModes":', $script );
|
|
$this->assertStringContainsString( '"tags":', $script );
|
|
$this->assertStringContainsString( '"doubleUnderscore":', $script );
|
|
$this->assertStringContainsString( '"functionSynonyms":', $script );
|
|
$this->assertStringContainsString( '"urlProtocols":', $script );
|
|
$this->assertStringContainsString( '"linkTrailCharacters":', $script );
|
|
}
|
|
|
|
}
|