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 ( 75bdf9...8faa57 )
by joseph
83:56 queued 81:04
created

AbstractEntityTestCreatorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 52
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A itCanCreateTheAbstractEntityTest() 0 34 1
A getCreator() 0 11 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Small\CodeGeneration\Creation\Tests\Entity;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Tests\Entities\AbstractEntityTestCreator;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\Factory\FileFactory;
7
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\Factory\FindReplaceFactory;
8
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File\Writer;
9
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\NamespaceHelper;
10
use EdmondsCommerce\DoctrineStaticMeta\Config;
11
use EdmondsCommerce\DoctrineStaticMeta\Tests\Small\ConfigTest;
12
use PHPUnit\Framework\TestCase;
13
14
/**
15
 * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Tests\Entities\AbstractEntityTestCreator
16
 * @small
17
 */
18
class AbstractEntityTestCreatorTest extends TestCase
19
{
20
    /**
21
     * @test
22
     */
23
    public function itCanCreateTheAbstractEntityTest()
24
    {
25
        $file     = $this->getCreator()->createTargetFileObject()->getTargetFile();
26
        $expected = '<?php declare(strict_types=1);
27
/**
28
 * To avoid collisions we use the verbose FQN for everything
29
 * This inevitably creates excessively long lines
30
 * So we disable that sniff in this file
31
 */
32
//phpcs:disable Generic.Files.LineLength.TooLong
33
namespace EdmondsCommerce\DoctrineStaticMeta\Entities;
34
35
use EdmondsCommerce\DoctrineStaticMeta\Entity as DSM;
36
37
/**
38
 * Class AbstractEntityTest
39
 *
40
 * This abstract test is designed to give you a good level of test coverage for your entities without any work required.
41
 *
42
 * You should extend the test with methods that test your specific business logic, your validators and anything else.
43
 *
44
 * You can override the methods, properties and constants as you see fit.
45
 *
46
 * @package EdmondsCommerce\DoctrineStaticMeta\Entity
47
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
48
 * @SuppressWarnings(PHPMD.NumberOfChildren)
49
 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
50
 */
51
abstract class AbstractEntityTest extends DSM\Testing\AbstractEntityTest
52
{
53
}
54
';
55
        $actual   = $file->getContents();
56
        self::assertSame($expected, $actual);
57
    }
58
59
    private function getCreator(): AbstractEntityTestCreator
60
    {
61
        $namespaceHelper = new NamespaceHelper();
62
        $config          = new Config(ConfigTest::SERVER);
63
64
        return new AbstractEntityTestCreator(
65
            new FileFactory($namespaceHelper, $config),
66
            $namespaceHelper,
67
            new Writer(),
68
            $config,
69
            new FindReplaceFactory()
70
        );
71
    }
72
}
73