Completed
Push — master ( 14218a...10a4b7 )
by Jeroen De
03:39
created

SetupTest::testCanConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 2
Metric Value
c 4
b 0
f 2
dl 0
loc 14
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
3
namespace GitHub\Tests\Phpunit;
4
5
use GitHub\Setup;
6
7
/**
8
 * @covers GitHub\Setup
9
 *
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class SetupTest extends \PHPUnit_Framework_TestCase {
14
15
	public function testCanConstruct() {
16
		$inputGlobals = array(
17
			'wgExtensionCredits' => array( 'other' => array() ),
18
			'wgExtensionMessagesFiles' => array(),
19
			'wgHooks' => array( 'ParserFirstCallInit' => array() ),
20
		);
21
22
		$setup = new Setup( $inputGlobals, __DIR__ . '/..' );
23
		$setup->run();
24
25
		$this->assertCount( 1, $inputGlobals['wgExtensionCredits']['other'], 'credits where set' );
26
		$this->assertCount( 2, $inputGlobals['wgExtensionMessagesFiles'], 'message files where registered' );
27
		$this->assertCount( 1, $inputGlobals['wgHooks']['ParserFirstCallInit'], 'parser hook was registered' );
28
	}
29
30
}
31