Completed
Push — master ( d2d28e...1c2760 )
by mw
35:37
created

NullPropertyAnnotatorTest::testMethodAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
nc 1
nop 0
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace SMW\Tests\PropertyAnnotators;
4
5
use SMW\PropertyAnnotators\NullPropertyAnnotator;
6
7
/**
8
 * @covers \SMW\PropertyAnnotators\NullPropertyAnnotator
9
 * @group semantic-mediawiki
10
 *
11
 * @license GNU GPL v2+
12
 * @since 1.9
13
 *
14
 * @author mwjames
15
 */
16
class NullPropertyAnnotatorTest extends \PHPUnit_Framework_TestCase {
17
18
	public function testCanConstruct() {
19
20
		$semanticData = $this->getMockBuilder( '\SMW\SemanticData' )
21
			->disableOriginalConstructor()
22
			->getMock();
23
24
		$this->assertInstanceOf(
25
			'\SMW\PropertyAnnotators\NullPropertyAnnotator',
26
			new NullPropertyAnnotator( $semanticData )
27
		);
28
	}
29
30
	public function testMethodAccess() {
31
32
		$semanticData = $this->getMockBuilder( '\SMW\SemanticData' )
33
			->disableOriginalConstructor()
34
			->getMock();
35
36
		$instance = new NullPropertyAnnotator( $semanticData );
37
38
		$this->assertInstanceOf(
39
			'\SMW\SemanticData',
40
			$instance->getSemanticData()
41
		);
42
43
		$this->assertInstanceOf(
44
			'\SMW\PropertyAnnotators\NullPropertyAnnotator',
45
			$instance->addAnnotation()
46
		);
47
48
	}
49
50
}
51