summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/OutlineTreeTest.php
blob: 3af491c0da3789efbb411f1c9f0a3c3a3e32fe47 (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
42
43
44
45
46
47
48
49
<?php

namespace SRF\Tests\Outline;

use SRF\Outline\OutlineTree;

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

	public function testCanConstruct() {

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

	public function testPropertyAccess() {

		$instance = new OutlineTree();

		$this->assertEmpty(
			$instance->tree
		);

		$this->assertEmpty(
			$instance->items
		);

		$this->assertEquals(
			0,
			$instance->itemCount
		);

		$this->assertEquals(
			0,
			$instance->leafCount
		);
	}

}