mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-04 02:28:14 +00:00
ff1c26e877
Change-Id: I242aa52a24a11de3db106e5e2c73bd6f2a95d80c
32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace CodeMirror\Tests;
|
|
|
|
use ResourceLoaderCodeMirrorModule;
|
|
use ResourceLoaderContext;
|
|
|
|
/**
|
|
* @covers \ResourceLoaderCodeMirrorModule
|
|
*/
|
|
class ResourceLoaderCodeMirrorModuleTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
public function testResourceLoaderModule() {
|
|
$context = $this->createMock( ResourceLoaderContext::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 );
|
|
}
|
|
|
|
}
|