Completed
Push — master ( da5294...d5aa74 )
by Kamil
09:29
created

it_gets_a_service()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the CrossContainerExtension package.
5
 *
6
 * (c) Kamil Kokot <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace spec\FriendsOfBehat\CrossContainerExtension;
13
14
use FriendsOfBehat\CrossContainerExtension\ContainerAccessor;
15
use PhpSpec\ObjectBehavior;
16
use Symfony\Component\DependencyInjection\ContainerInterface;
17
18
final class ContainerBasedContainerAccessorSpec extends ObjectBehavior
19
{
20
    function let(ContainerInterface $container)
21
    {
22
        $this->beConstructedWith($container);
23
    }
24
25
    function it_is_a_container_accessor()
26
    {
27
        $this->shouldImplement(ContainerAccessor::class);
28
    }
29
30
    function it_gets_a_service(ContainerInterface $container)
31
    {
32
        $service = new \stdClass();
33
34
        $container->get('acme')->willReturn($service);
35
36
        $this->getService('acme')->shouldReturn($service);
37
    }
38
39
    function it_gets_a_parameter(ContainerInterface $container)
40
    {
41
        $container->getParameter('acme')->willReturn('parameter value');
42
43
        $this->getParameter('acme')->shouldReturn('parameter value');
44
    }
45
}
46