Completed
Push — master ( 03e47f...db33ac )
by WEBEWEB
06:42 queued 01:35
created

BreadcrumbNodeTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 23 1
1
<?php
2
3
/**
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2017 NdC/WBW
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Core\Tests\Navigation\Node;
13
14
use PHPUnit_Framework_TestCase;
15
use WBW\Library\Core\Navigation\Node\BreadcrumbNode;
16
17
/**
18
 * Breadcrumb node test.
19
 *
20
 * @author NdC/WBW <https://github.com/webeweb/>
21
 * @package WBW\Library\Core\Tests\Navigation\Node
22
 * @final
23
 */
24
final class BreadcrumbNodeTest extends PHPUnit_Framework_TestCase {
25
26
	/**
27
	 * Tests the __construct() method.
28
	 *
29
	 * @return void
30
	 */
31
	public function testConstructor() {
32
33
		$obj = new BreadcrumbNode("id");
34
35
		$this->assertEquals(false, $obj->getActive());
36
		$this->assertEquals(false, $obj->getEnable());
37
		$this->assertEquals(null, $obj->getIcon());
38
		$this->assertEquals(null, $obj->getRoute());
39
		$this->assertEquals(null, $obj->getUrl());
40
		$this->assertEquals(false, $obj->getVisible());
41
42
		$obj->setActive(true);
43
		$obj->setEnable(true);
44
		$obj->setIcon("icon");
45
		$obj->setRoute("route");
46
		$obj->setUrl("url");
47
48
		$this->assertEquals(true, $obj->getActive());
49
		$this->assertEquals(true, $obj->getEnable());
50
		$this->assertEquals("icon", $obj->getIcon());
51
		$this->assertEquals("route", $obj->getRoute());
52
		$this->assertEquals("url", $obj->getUrl());
53
	}
54
55
}
56