it_is_initializable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace spec\Gesdinet\JWTRefreshTokenBundle\DependencyInjection;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
9
10
class GesdinetJWTRefreshTokenExtensionSpec extends ObjectBehavior
11
{
12
    public function it_is_initializable()
13
    {
14
        $this->shouldHaveType('Gesdinet\JWTRefreshTokenBundle\DependencyInjection\GesdinetJWTRefreshTokenExtension');
15
    }
16
17
    public function it_should_set_parameters_correctly(ContainerBuilder $container, ParameterBag $parameterBag)
18
    {
19
        $parameterBag->resolveValue(Argument::any())->will(function ($args) {
20
            return $args[0];
21
        });
22
        $parameterBag->unescapeValue(Argument::any())->will(function ($args) {
23
            return $args[0];
24
        });
25
26
        $container->getParameterBag()->willReturn($parameterBag);
0 ignored issues
show
Bug introduced by
The method willReturn() does not seem to exist on object<Symfony\Component...\ParameterBagInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
        $container->fileExists(Argument::any())->willReturn(true);
28
        $container->setParameter(Argument::any(), Argument::any())->will(function () {
29
        });
30
        $container->setDefinition(Argument::any(), Argument::any())->will(function () {
0 ignored issues
show
Bug introduced by
The method will() does not seem to exist on object<Symfony\Component...cyInjection\Definition>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
31
        });
32
        $container->getReflectionClass(Argument::type('string'))->will(function ($args) {
33
            return new \ReflectionClass($args[0]);
34
        });
35
        $container->addResource(Argument::any())->willReturn(null);
0 ignored issues
show
Bug introduced by
The method willReturn() does not seem to exist on object<Symfony\Component...ction\ContainerBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
36
        $container->removeBindings(Argument::any())->willReturn(null);
0 ignored issues
show
Bug introduced by
The method removeBindings() does not seem to exist on object<Symfony\Component...ction\ContainerBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
38
        $container->removeBindings(Argument::any())->will(function () {
0 ignored issues
show
Bug introduced by
The method removeBindings() does not seem to exist on object<Symfony\Component...ction\ContainerBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
39
        });
40
41
        $configs = array();
42
        $this->load($configs, $container);
43
    }
44
}
45