mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-12 14:25:06 +00:00
197b5649ff
Autocomplete magic words, tag names and url protocols. This patch also enables block comment using `<!-- -->`. Bug: T95100 Change-Id: If37da956ac1eb945b96753e6728c0247b1a68b66
31 lines
1.2 KiB
PHP
31 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\CodeMirror\Tests;
|
|
|
|
use MediaWiki\Extension\CodeMirror\DataScript;
|
|
use MediaWiki\ResourceLoader\Context;
|
|
|
|
/**
|
|
* @covers \MediaWiki\Extension\CodeMirror\DataScript
|
|
*/
|
|
class DataScriptTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
public function testMakeScript() {
|
|
$context = $this->createMock( Context::class );
|
|
|
|
$script = DataScript::makeScript( $context );
|
|
$this->assertStringContainsString( '"extCodeMirrorConfig":', $script );
|
|
$this->assertStringContainsString( '"lineNumberingNamespaces":', $script );
|
|
$this->assertStringContainsString( '"templateFoldingNamespaces":', $script );
|
|
$this->assertStringContainsString( '"autocompleteNamespaces":', $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 );
|
|
}
|
|
|
|
}
|