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

LuaLibraryTestBase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A getLuaLibrary() 0 3 1
1
<?php
2
3
namespace BootstrapComponents\Tests\Unit;
4
5
use BootstrapComponents\LuaLibrary;
6
use \Scribunto_LuaEngineTestBase;
7
8
/**
9
 * @ingroup Test
10
 *
11
 * @group   extension-bootstrap-components
12
 * @group   mediawiki-databaseless
13
 *
14
 * @license GNU GPL v3+
15
 *
16
 * @since   1.1
17
 * @author  Tobias Oetterer
18
 */
19
abstract class LuaLibraryTestBase extends Scribunto_LuaEngineTestBase
20
{
21
	/**
22
	 * @var LuaLibrary
23
	 */
24
	private $luaLibrary;
25
26
	/**
27
	 * @throws \MWException
28
	 */
29
	protected function setUp() {
30
		parent::setUp();
31
32
		/** @noinspection PhpParamsInspection */
33
		$this->luaLibrary = new LuaLibrary(
34
			$this->getEngine()
35
		);
36
	}
37
38
	/**
39
	 * Accesses an instance of class {@see LuaLibrary}
40
	 *
41
	 * @return LuaLibrary LuaLibrary
42
	 */
43
	public function getLuaLibrary() {
44
		return $this->luaLibrary;
45
	}
46
}