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

ListTreeBuilderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 7 1
A testBuildForEmptyTree() 0 13 1
1
<?php
2
3
namespace SRF\Tests\Outline;
4
5
use SRF\Outline\ListTreeBuilder;
6
use SRF\Outline\OutlineTree;
7
8
/**
9
 * @covers \SRF\Outline\ListTreeBuilder
10
 * @group semantic-result-formats
11
 *
12
 * @license GNU GPL v2+
13
 * @since 3.1
14
 *
15
 * @author mwjames
16
 */
17
class ListTreeBuilderTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testCanConstruct() {
20
21
		$this->assertInstanceOf(
22
			ListTreeBuilder::class,
23
			new ListTreeBuilder( [] )
24
		);
25
	}
26
27
	public function testBuildForEmptyTree() {
28
29
		$params = [
30
			'outlineproperties' => [ 'Foo' ]
31
		];
32
33
		$instance = new ListTreeBuilder( $params );
34
35
		$this->assertInternalType(
36
			'string',
37
			$instance->build( new OutlineTree() )
38
		);
39
	}
40
41
}
42