summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/UniversalLanguageSelector/tests/phpunit/ResourceLoaderULSModuleTest.php')
-rw-r--r--MLEB/UniversalLanguageSelector/tests/phpunit/ResourceLoaderULSModuleTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/MLEB/UniversalLanguageSelector/tests/phpunit/ResourceLoaderULSModuleTest.php b/MLEB/UniversalLanguageSelector/tests/phpunit/ResourceLoaderULSModuleTest.php
new file mode 100644
index 00000000..5036f621
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/tests/phpunit/ResourceLoaderULSModuleTest.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace UniversalLanguageSelector\Tests;
+
+use ResourceLoaderULSModule;
+
+/**
+ * @covers \ResourceLoaderULSModule
+ *
+ * @license GPL-2.0-or-later
+ * @author Thiemo Kreuz
+ */
+class ResourceLoaderULSModuleTest extends \PHPUnit\Framework\TestCase {
+ use \PHPUnit4And6Compat;
+
+ public function testAllReturnValues() {
+ $instance = new ResourceLoaderULSModule();
+
+ $context = $this->createMock( \ResourceLoaderContext::class );
+ $context->method( 'getLanguage' )
+ ->willReturn( 'en' );
+
+ $script = $instance->getScript( $context );
+ $this->assertStringStartsWith( 'mw.config.set({"wgULSLanguages":{"', $script );
+
+ $this->assertTrue( $instance->enableModuleContentVersion() );
+ }
+
+}