GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( daa81e...27aa0b )
by Benjamin
02:25
created

HydratorDecoratorFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testCreateHydratorFileCreatesFile() 0 12 1
1
<?php
2
3
namespace Tests\Lib\Db\Orm;
4
5
use Lib\Db\Orm\HydratorDecoratorFactory;
6
use Lib\Routing\RouteDefinition;
7
use PHPUnit\Framework\TestCase;
8
9
class HydratorDecoratorFactoryTest extends TestCase
10
{
11
    private $factory;
12
13
    public function setUp()
14
    {
15
        $this->factory = new HydratorDecoratorFactory();
16
    }
17
18
    public function testCreateHydratorFileCreatesFile()
19
    {
20
        $file          = __DIR__.'/../../../../../../var/cache/tests/RouteDefinitionHydratorDecorator.php';
21
        $hydratorClass = 'RouteDefinitionHydratorDecorator';
22
23
        $this->factory->createHydratorFile(RouteDefinition::class, $hydratorClass, $file);
24
        include($file);
25
        $hydrator = new $hydratorClass('home', '/');
26
27
        $this->assertTrue(file_exists($file));
28
        $this->assertInstanceOf(RouteDefinition::class, $hydrator);
29
        unlink($file);
30
    }
31
}
32