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

SharedServicesContainerTest::testRegister()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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