BreadcrumbsNodeTest::testCreateAndGetter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Yceruto\Bundle\BreadcrumbsBundle\Tests;
4
5
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
6
use Yceruto\Bundle\BreadcrumbsBundle\BreadcrumbsNode;
7
8
class BreadcrumbsNodeTest extends TestCase
9
{
10
    public function testCreateAndGetter()
11
    {
12
        $node = new BreadcrumbsNode('/', 'index');
13
        $this->assertEquals('/', $node->getPath());
14
        $this->assertEquals('index', $node->getLabel());
15
    }
16
17
    public function testSetter()
18
    {
19
        $node = new BreadcrumbsNode();
20
        $node->setPath('/');
21
        $node->setLabel('index');
22
23
        $this->assertEquals('/', $node->getPath());
24
        $this->assertEquals('index', $node->getLabel());
25
    }
26
27
    public function testToString()
28
    {
29
        $node = new BreadcrumbsNode('/', 'index');
30
        $this->assertEquals('index', (string) $node);
31
    }
32
}
33