blob: 5036f6213da78c5f87fdbd1dc21a658822405425 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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() );
}
}
|