Passed
Push — master ( 064bed...d815ea )
by Gerrit
04:18
created

MappingStaticPHPDriverFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A shouldCreatedAnnotationMappingDriver() 0 9 1
1
<?php
2
/**
3
 * Copyright (C) 2018 Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 * @license GPL-3.0
8
 * @author Gerrit Addiks <[email protected]>
9
 */
10
11
namespace Addiks\RDMBundle\Tests\Mapping\DriverFactories;
12
13
use PHPUnit\Framework\TestCase;
14
use Addiks\RDMBundle\Mapping\DriverFactories\MappingDriverFactoryInterface;
15
use Addiks\RDMBundle\Mapping\Drivers\MappingDriverInterface;
16
use Addiks\RDMBundle\Mapping\DriverFactories\MappingStaticPHPDriverFactory;
17
use Addiks\RDMBundle\Mapping\Drivers\MappingStaticPHPDriver;
18
use Doctrine\ORM\Mapping\Driver\StaticPHPDriver;
19
20
final class MappingStaticPHPDriverFactoryTest extends TestCase
21
{
22
23
    /**
24
     * @var MappingStaticPHPDriverFactory
25
     */
26
    private $driverFactory;
27
28
    public function setUp(): void
29
    {
30
        $this->driverFactory = new MappingStaticPHPDriverFactory();
31
    }
32
33
    /**
34
     * @test
35
     */
36
    public function shouldCreatedAnnotationMappingDriver()
37
    {
38
        /** @var StaticPHPDriver $mappingDriver */
39
        $mappingDriver = $this->createMock(StaticPHPDriver::class);
40
41
        /** @var MappingStaticPHPDriver $rdmMappingDriver */
42
        $rdmMappingDriver = $this->driverFactory->createRDMMappingDriver($mappingDriver);
43
44
        $this->assertInstanceOf(MappingStaticPHPDriver::class, $rdmMappingDriver);
45
    }
46
47
}
48