Completed
Push — master ( 68f942...d69058 )
by Rafał
18:18
created

TenantRepositorySpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_is_a_repository() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher MultiTenancy Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. 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\Bundle\MultiTenancyBundle\Doctrine\ORM;
15
16
use Doctrine\ORM\EntityManagerInterface;
17
use Doctrine\ORM\Mapping\ClassMetadata;
18
use PhpSpec\ObjectBehavior;
19
use SWP\Bundle\MultiTenancyBundle\Doctrine\ORM\TenantRepository;
20
use SWP\Bundle\StorageBundle\Doctrine\ORM\EntityRepository;
21
use SWP\Component\MultiTenancy\Repository\TenantRepositoryInterface;
22
23
/**
24
 * @mixin TenantRepository
25
 */
26
class TenantRepositorySpec extends ObjectBehavior
27
{
28
    function let(EntityManagerInterface $entityManager, ClassMetadata $classMetadata)
29
    {
30
        $this->beConstructedWith($entityManager, $classMetadata);
31
    }
32
33
    function it_is_initializable()
34
    {
35
        $this->shouldHaveType(TenantRepository::class);
36
    }
37
38
    function it_is_a_repository()
39
    {
40
        $this->shouldHaveType(EntityRepository::class);
41
        $this->shouldImplement(TenantRepositoryInterface::class);
42
    }
43
}
44