Completed
Push — master ( bd4c23...b341c0 )
by Filipe
10:29
created

ContainerFactorySpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_creates_a_dependency_container() 0 6 1
1
<?php
2
3
namespace spec\Slick\Mvc\Console\Service;
4
5
use Slick\Di\ContainerInterface;
6
use Slick\Mvc\Console\Service\ContainerFactory;
7
use PhpSpec\ObjectBehavior;
8
use Prophecy\Argument;
9
use Symfony\Component\Console\Command\Command;
10
11
class ContainerFactorySpec extends ObjectBehavior
12
{
13
    function let(Command $command)
14
    {
15
        $this->beConstructedThrough('create', [$command]);
16
    }
17
18
    function it_is_initializable()
19
    {
20
        $this->shouldHaveType(ContainerFactory::class);
21
    }
22
23
    function it_creates_a_dependency_container(Command $command)
24
    {
25
        $this->beConstructedThrough('create', [$command]);
26
        $this->container()->shouldBeAnInstanceOf(ContainerInterface::class);
27
        $this->container()->get(Command::class)->shouldBe($command);
28
    }
29
}
30