PathExpanderSpec   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 8 1
A it_should_expand_bundle_paths() 0 4 1
A it_should_not_change_other_paths() 0 4 1
1
<?php
2
3
namespace spec\Knp\RadBundle\Filesystem;
4
5
use PhpSpec\ObjectBehavior;
6
7
class PathExpanderSpec extends ObjectBehavior
8
{
9
    /**
10
     * @param  Symfony\Component\HttpKernel\KernelInterface        $kernel
11
     * @param  Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle
12
     */
13
    public function let($kernel, $bundle)
14
    {
15
        $this->beConstructedWith($kernel);
16
17
        $kernel->getBundle('App')->willReturn($bundle);
18
19
        $bundle->getPath()->willReturn('/my/project/src/App');
20
    }
21
22
    public function it_should_expand_bundle_paths($kernel, $bundle)
0 ignored issues
show
Unused Code introduced by
The parameter $kernel is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $bundle is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Coding Style introduced by
Method name "PathExpanderSpec::it_should_expand_bundle_paths" is not in camel caps format
Loading history...
23
    {
24
        $this->expand('@App/Resources/config/routing.yml')->shouldReturn('/my/project/src/App/Resources/config/routing.yml');
25
    }
26
27
    public function it_should_not_change_other_paths()
0 ignored issues
show
Coding Style introduced by
Method name "PathExpanderSpec::it_should_not_change_other_paths" is not in camel caps format
Loading history...
28
    {
29
        $this->expand('/some/absolute/path')->shouldReturn('/some/absolute/path');
30
    }
31
}
32