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 (#58)
by joseph
28:39
created

theEmbeddableCanBeSettedAndGetted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Identity;
4
5
use EdmondsCommerce\DoctrineStaticMeta\AbstractIntegrationTest;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Identity\FullNameEmbeddable;
7
8
class HasFullNameEmbeddableTraitIntegrationTest extends AbstractIntegrationTest
9
{
10
    public const WORK_DIR = AbstractIntegrationTest::VAR_PATH.'/'
11
                            .self::TEST_TYPE.'/HasFullNameEmbeddableTraitIntegrationTest';
12
13
    private const TEST_ENTITY = self::TEST_PROJECT_ROOT_NAMESPACE.'\\Entities\\Person';
14
15
    /**
16
     * @var HasFullNameEmbeddableTrait
17
     */
18
    private $entity;
19
20
    public function setup()
21
    {
22
        parent::setup();
23
        $this->getEntityGenerator()->generateEntity(self::TEST_ENTITY);
24
        $this->getEntityEmbeddableSetter()
25
             ->setEntityHasEmbeddable(self::TEST_ENTITY, HasFullNameEmbeddableTrait::class);
26
        $this->setupCopiedWorkDir();
27
        $entityFqn    = $this->getCopiedFqn(self::TEST_ENTITY);
28
        $this->entity = new $entityFqn;
29
    }
30
31
    /**
32
     * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
33
     * @throws \ReflectionException
34
     * @test
35
     * @medium
36
     * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Generator\Embeddable\EntityEmbeddableSetter
37
     */
38
    public function generatedCodePassesQa()
39
    {
40
        $this->assertTrue($this->qaGeneratedCode());
41
    }
42
43
    /**
44
     * @test
45
     * @medium
46
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Identity\HasFullNameEmbeddableTrait
47
     */
48
    public function theEmbeddableCanBeSettedAndGetted()
49
    {
50
        $expected = (new FullNameEmbeddable())->setFirstName('Rob');
51
        $this->entity->setFullNameEmbeddable($expected);
52
        $actual = $this->entity->getFullNameEmbeddable();
53
        $this->assertSame($expected, $actual);
54
    }
55
}
56