Completed
Push — master ( c81f6c...1650a0 )
by mw
07:33
created

OutlineTreeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 7 1
A testPropertyAccess() 0 22 1
1
<?php
2
3
namespace SRF\Tests\Outline;
4
5
use SRF\Outline\OutlineTree;
6
7
/**
8
 * @covers \SRF\Outline\OutlineTree
9
 * @group semantic-result-formats
10
 *
11
 * @license GNU GPL v2+
12
 * @since 3.1
13
 *
14
 * @author mwjames
15
 */
16
class OutlineTreeTest extends \PHPUnit_Framework_TestCase {
17
18
	public function testCanConstruct() {
19
20
		$this->assertInstanceOf(
21
			OutlineTree::class,
22
			new OutlineTree( [] )
23
		);
24
	}
25
26
	public function testPropertyAccess() {
27
28
		$instance = new OutlineTree();
29
30
		$this->assertEmpty(
31
			$instance->tree
32
		);
33
34
		$this->assertEmpty(
35
			$instance->items
36
		);
37
38
		$this->assertEquals(
39
			0,
40
			$instance->itemCount
41
		);
42
43
		$this->assertEquals(
44
			0,
45
			$instance->leafCount
46
		);
47
	}
48
49
}
50