SymfonyServiceLocatorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_proxies_to_container() 0 14 1
1
<?php
2
3
namespace Devmachine\Bundle\ServicesInjectorBundle\Tests\ServiceLocator;
4
5
use Devmachine\Bundle\ServicesInjectorBundle\ServiceLocator\SymfonyServiceLocator;
6
7
class SymfonyServiceLocatorTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @test
11
     */
12
    public function it_proxies_to_container()
13
    {
14
        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
15
        $container
16
            ->expects($this->exactly(2))
17
            ->method('get')
18
            ->withConsecutive(
19
                [$this->equalTo('foo')],
20
                [$this->equalTo('bar')]
21
            )
22
        ;
23
        $locator = new SymfonyServiceLocator($container);
24
        $locator->get('foo');
25
        $locator->get('bar');
26
    }
27
}
28