SetupTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 14 1
1
<?php
2
3
namespace GitHub\Tests\Phpunit;
4
5
use GitHub\Setup;
6
use GitHub\Tests\MediaWikiBoundTestCase;
7
8
/**
9
 * @covers \GitHub\Setup
10
 *
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class SetupTest extends MediaWikiBoundTestCase {
15
16
	public function testCanConstruct() {
17
		$inputGlobals = [
18
			'wgExtensionCredits' => [ 'other' => [] ],
19
			'wgHooks' => [ 'ParserFirstCallInit' => [] ],
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( 1, $inputGlobals['wgHooks']['ParserFirstCallInit'], 'parser hook was registered' );
27
28
		$setup->getGitHubHookHandler();
29
	}
30
31
}
32