TenantRepositorySpec::it_is_a_repository()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
dl 5
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
15
namespace spec\SWP\Bundle\MultiTenancyBundle\Doctrine\PHPCR;
16
17
use Doctrine\ODM\PHPCR\DocumentManagerInterface;
18
use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
19
use PhpSpec\ObjectBehavior;
20
use SWP\Bundle\MultiTenancyBundle\Doctrine\PHPCR\TenantRepository;
21
use SWP\Bundle\StorageBundle\Doctrine\ODM\PHPCR\DocumentRepository;
22
use SWP\Component\MultiTenancy\Repository\TenantRepositoryInterface;
23
24
/**
25
 * @mixin TenantRepository
26
 */
27 View Code Duplication
class TenantRepositorySpec extends ObjectBehavior
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
28
{
29
    public function let(DocumentManagerInterface $documentManager, ClassMetadata $classMetadata)
30
    {
31
        $this->beConstructedWith($documentManager, $classMetadata);
32
    }
33
34
    public function it_is_initializable()
35
    {
36
        $this->shouldHaveType(TenantRepository::class);
37
    }
38
39
    public function it_is_a_repository()
40
    {
41
        $this->shouldHaveType(DocumentRepository::class);
42
        $this->shouldImplement(TenantRepositoryInterface::class);
43
    }
44
}
45