Completed
Branch master (ecb46d)
by Tobias
01:39
created

LuaLibraryGetSkinTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTestModules() 0 5 1
A testParse() 0 10 1
1
<?php
2
3
namespace BootstrapComponents\Tests\Unit;
4
5
/**
6
 * @covers \BootstrapComponents\LuaLibrary
7
 * @ingroup Test
8
 *
9
 * @group   extension-bootstrap-components
10
 * @group   mediawiki-databaseless
11
 *
12
 * @license GNU GPL v3+
13
 *
14
 * @since   1.1
15
 * @author  Tobias Oetterer
16
 */
17
class LuaLibraryGetSkinTest extends LuaLibraryTestBase {
18
19
	/**
20
	 * Lua test module
21
	 * @var string
22
	 */
23
	protected static $moduleName = self::class;
24
25
	/**
26
	 * LuaLibraryTestBase::getTestModules
27
	 */
28
	public function getTestModules() {
29
		return parent::getTestModules() + array(
30
			self::$moduleName => __DIR__ . '/' . 'mw.bootstrap.getSkin.tests.lua',
31
		);
32
	}
33
34
35
	/**
36
	 * Tests method parse
37
	 */
38
	public function testParse() {
39
		$this->assertArrayHasKey(
40
			0,
41
			$this->getLuaLibrary()->getSkin()
42
		);
43
		$this->assertEquals(
44
			'vector',
45
			$this->getLuaLibrary()->getSkin()[0]
46
		);
47
	}
48
}