Completed
Pull Request — master (#1)
by Rafał
03:14
created

it_should_get_tenant_aware_prefixes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher MultiTenancy Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.u. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace spec\SWP\MultiTenancyBundle\Doctrine\PHPCR;
15
16
use PhpSpec\ObjectBehavior;
17
use SWP\Component\MultiTenancy\PathBuilder\TenantAwarePathBuilderInterface;
18
19
class PrefixCandidatesSpec extends ObjectBehavior
20
{
21
    public function let()
22
    {
23
        $this->beConstructedWith([]);
24
    }
25
26
    public function it_is_initializable()
27
    {
28
        $this->shouldHaveType('Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\PrefixCandidates');
29
    }
30
31
    public function it_should_get_tenant_aware_prefixes(TenantAwarePathBuilderInterface $pathBuilder)
32
    {
33
        $pathsNames = ['routes', 'custom'];
34
        $this->setRoutePathsNames($pathsNames);
35
        $pathBuilder->build($pathsNames)->willReturn(['/swp/default/routes', '/swp/default/custom']);
36
        $this->setPathBuilder($pathBuilder);
37
        $this->getPrefixes()->shouldReturn(['/swp/default/routes', '/swp/default/custom']);
38
    }
39
}
40