PropertyRegistryTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

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