summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/ListTreeBuilderTest.php
blob: 80679e90ff70bde18a8d5b032320b723be7b57d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

namespace SRF\Tests\Outline;

use SRF\Outline\ListTreeBuilder;
use SRF\Outline\OutlineTree;

/**
 * @covers \SRF\Outline\ListTreeBuilder
 * @group semantic-result-formats
 *
 * @license GNU GPL v2+
 * @since 3.1
 *
 * @author mwjames
 */
class ListTreeBuilderTest extends \PHPUnit_Framework_TestCase {

	public function testCanConstruct() {

		$this->assertInstanceOf(
			ListTreeBuilder::class,
			new ListTreeBuilder( [] )
		);
	}

	public function testBuildForEmptyTree() {

		$params = [
			'outlineproperties' => [ 'Foo' ]
		];

		$instance = new ListTreeBuilder( $params );

		$this->assertInternalType(
			'string',
			$instance->build( new OutlineTree() )
		);
	}

}