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

LuaLibraryTestBase::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
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
}