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
Pull Request — master (#131)
by joseph
33:18 queued 10:43
created

IntegerIdFieldTraitTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A generateCode() 0 5 1
A createDatabaseSchema() 0 3 1
A createEntityWithField() 0 3 1
A validateSavedEntity() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Large\Entity\Fields\Traits\PrimaryKey;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Interfaces\PrimaryKey\IdFieldInterface;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\IntegerIdFieldTrait;
7
use EdmondsCommerce\DoctrineStaticMeta\Tests\Assets\AbstractTest;
8
9
/**
10
 * Class UuidFieldTraitTest
11
 *
12
 * @package EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey
13
 * @SuppressWarnings(PHPMD.DepthOfInheritance)
14
 */
15
class IntegerIdFieldTraitTest extends IdFieldTraitTest
16
{
17
    public const    WORK_DIR        = AbstractTest::VAR_PATH .
18
                                      '/' .
19
                                      self::TEST_TYPE_LARGE .
20
                                      '/IntegerIdFieldTraitTest/';
21
    protected const TEST_FIELD_FQN  = IntegerIdFieldTrait::class;
22
    protected const TEST_FIELD_PROP = IdFieldInterface::PROP_ID;
23
24
    public function generateCode()
25
    {
26
        $this->getEntityGenerator()
27
             ->setUseUuidPrimaryKey(false)
28
             ->generateEntity(static::TEST_ENTITY_FQN_BASE . $this->entitySuffix);
29
    }
30
31
    /**
32
     * @test
33
     * @large
34
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\IntegerIdFieldTrait
35
     * @throws \ReflectionException
36
     */
37
    public function createEntityWithField(): void
38
    {
39
        parent::createEntityWithField();
40
    }
41
42
    /**
43
     * @test
44
     * @large
45
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\IntegerIdFieldTrait
46
     * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
47
     * @throws \ReflectionException
48
     */
49
    public function createDatabaseSchema()
50
    {
51
        parent::createDatabaseSchema(); // TODO: Change the autogenerated stub
52
    }
53
54
    protected function validateSavedEntity($entity)
55
    {
56
        $id = $entity->getId();
57
        self::assertNotEmpty($id);
58
        self::assertInternalType('int', $id);
59
    }
60
}
61