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

TemplateBuilderTest::testBuildForEmptyTree()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SRF\Tests\Outline;
4
5
use SRF\Outline\TemplateBuilder;
6
use SRF\Outline\OutlineTree;
7
8
/**
9
 * @covers \SRF\Outline\TemplateBuilder
10
 * @group semantic-result-formats
11
 *
12
 * @license GNU GPL v2+
13
 * @since 3.1
14
 *
15
 * @author mwjames
16
 */
17
class TemplateBuilderTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testCanConstruct() {
20
21
		$this->assertInstanceOf(
22
			TemplateBuilder::class,
23
			new TemplateBuilder( [] )
24
		);
25
	}
26
27
	public function testBuildForEmptyTree() {
28
29
		$params = [
30
			'outlineproperties' => [ 'Foo' ],
31
			'template' => 'Bar',
32
			'userparam' => ''
33
		];
34
35
		$instance = new TemplateBuilder( $params );
36
37
		$this->assertInternalType(
38
			'string',
39
			$instance->build( new OutlineTree() )
40
		);
41
	}
42
43
}
44