BreadcrumbsNodeTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testCreateAndGetter() 0 6 1
A testSetter() 0 9 1
A testToString() 0 5 1
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