@@ 40-46 (lines=7) @@ | ||
37 | $this->getService('acme')->shouldReturn($service); |
|
38 | } |
|
39 | ||
40 | function it_gets_parameters_from_frozen_container(Container $container) |
|
41 | { |
|
42 | $container->isFrozen()->willReturn(true); |
|
43 | $container->getParameterBag()->willReturn(new ParameterBag(['name' => 'value'])); |
|
44 | ||
45 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
46 | } |
|
47 | ||
48 | function it_gets_parameters_from_not_frozen_container(Container $container) |
|
49 | { |
|
@@ 48-54 (lines=7) @@ | ||
45 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
46 | } |
|
47 | ||
48 | function it_gets_parameters_from_not_frozen_container(Container $container) |
|
49 | { |
|
50 | $container->isFrozen()->willReturn(false); |
|
51 | $container->getParameterBag()->willReturn(new ParameterBag(['name' => 'value'])); |
|
52 | ||
53 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
54 | } |
|
55 | } |
|
56 |
@@ 50-58 (lines=9) @@ | ||
47 | $this->shouldThrow(\DomainException::class)->during('getService', ['acme']); |
|
48 | } |
|
49 | ||
50 | function it_gets_parameters_from_frozen_container(KernelInterface $kernel, Container $container) |
|
51 | { |
|
52 | $kernel->getContainer()->willReturn($container); |
|
53 | ||
54 | $container->isFrozen()->willReturn(true); |
|
55 | $container->getParameterBag()->willReturn(new ParameterBag(['name' => 'value'])); |
|
56 | ||
57 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
58 | } |
|
59 | ||
60 | function it_gets_parameters_from_not_frozen_container(KernelInterface $kernel, Container $container) |
|
61 | { |
|
@@ 60-68 (lines=9) @@ | ||
57 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
58 | } |
|
59 | ||
60 | function it_gets_parameters_from_not_frozen_container(KernelInterface $kernel, Container $container) |
|
61 | { |
|
62 | $kernel->getContainer()->willReturn($container); |
|
63 | ||
64 | $container->isFrozen()->willReturn(false); |
|
65 | $container->getParameterBag()->willReturn(new ParameterBag(['name' => 'value'])); |
|
66 | ||
67 | $this->getParameters()->shouldReturn(['name' => 'value']); |
|
68 | } |
|
69 | ||
70 | function it_throws_an_exception_if_could_not_get_parameters(KernelInterface $kernel, ContainerInterface $container) |
|
71 | { |