Completed
Push — master ( 9d465f...839e16 )
by mw
134:44 queued 99:44
created

SharedServicesContainerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 12 1
A testRegister() 0 12 1
1
<?php
2
3
namespace SMW\Tests\Services;
4
5
use SMW\Services\SharedServicesContainer;
6
7
/**
8
 * @covers \SMW\Services\SharedServicesContainer
9
 * @group semantic-mediawiki
10
 *
11
 * @license GNU GPL v2+
12
 * @since 2.3
13
 *
14
 * @author mwjames
15
 */
16
class SharedServicesContainerTest extends \PHPUnit_Framework_TestCase {
17
18
	public function testCanConstruct() {
19
20
		$this->assertInstanceOf(
21
			SharedServicesContainer::class,
22
			new SharedServicesContainer()
23
		);
24
25
		$this->assertInstanceOf(
26
			'\Onoi\CallbackContainer\CallbackContainer',
27
			new SharedServicesContainer()
28
		);
29
	}
30
31
	public function testRegister() {
32
33
		$containerBuilder = $this->getMockBuilder( '\Onoi\CallbackContainer\ContainerBuilder' )
34
			->disableOriginalConstructor()
35
			->getMock();
36
37
		$containerBuilder->expects( $this->atLeastOnce() )
38
			->method( 'registerCallback' );
39
40
		$instance = new SharedServicesContainer();
41
		$instance->register( $containerBuilder );
42
	}
43
44
}
45