mediawiki-extensions-CodeMi.../tests/phpunit/DataScriptTest.php
Tim Starling 7a3f46b490 Migrate ResourceLoaderCodeMirrorModule to a virtual file callback
Bug: T47514
Depends-On: I97d61b5793159cea365740e0563f7b733e0f16de
Change-Id: I31b80fc1c7701fc1075d655270706e341942415d
2023-05-05 16:26:09 +10:00

28 lines
954 B
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( '"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 );
}
}