Passed
Branch master (e8fd46)
by Alexey
03:15
created

RouteDispatcherFactorySpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 2
1
<?php
2
3
namespace spec\Venta\Routing\Factory;
4
5
use PhpSpec\ObjectBehavior;
6
use Venta\Contracts\Container\Container;
7
use Venta\Contracts\Routing\Route;
8
use Venta\Routing\RouteDispatcher;
9
10
class RouteDispatcherFactorySpec extends ObjectBehavior
11
{
12
13
    function let(Container $container)
14
    {
15
        $this->beConstructedWith($container);
16
    }
17
18
    function it_creates_route_dispatcher(Route $route, Container $container)
19
    {
20
        $this->create($route)->shouldBeLike(
21
            new RouteDispatcher($route->getWrappedObject(), $container->getWrappedObject())
22
        );
23
    }
24
25
    function it_is_initializable()
26
    {
27
        $this->shouldImplement(\Venta\Contracts\Routing\RouteDispatcherFactory::class);
28
    }
29
}
30
31