it_proxies_to_container()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 14
rs 9.4285
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