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

HasFullNameEmbeddableTraitFunctionalTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A theEntityCanBeSavedAndLoadedWithCorrectValues() 0 20 1
A setup() 0 8 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Identity;
4
5
use EdmondsCommerce\DoctrineStaticMeta\AbstractFunctionalTest;
6
7
class HasFullNameEmbeddableTraitFunctionalTest extends AbstractFunctionalTest
8
{
9
    public const WORK_DIR = self::VAR_PATH.'/'.self::TEST_TYPE.'/HasAddressEmbeddableTraitFunctionalTest';
10
11
    private const TEST_ENTITY = self::TEST_PROJECT_ROOT_NAMESPACE.'\\Entities\\Place';
12
13
    private $entityFqn;
14
15
    public function setup()
16
    {
17
        parent::setup();
18
        $this->getEntityGenerator()->generateEntity(self::TEST_ENTITY);
19
        $this->getEntityEmbeddableSetter()
20
             ->setEntityHasEmbeddable(self::TEST_ENTITY, HasFullNameEmbeddableTrait::class);
21
        $this->setupCopiedWorkDirAndCreateDatabase();
22
        $this->entityFqn = $this->getCopiedFqn(self::TEST_ENTITY);
23
    }
24
25
    /**
26
     * @test
27
     * @large
28
     */
29
    public function theEntityCanBeSavedAndLoadedWithCorrectValues()
30
    {
31
        $entity = new $this->entityFqn;
32
        $entity->getFullNameEmbeddable()
33
               ->setTitle('Mr')
34
               ->setFirstname('Aklhasd')
35
               ->setMiddleNames([
36
                                    'Blah',
37
                                    'Foo',
38
                                    'Cheese',
39
                                ])
40
               ->setLastName('TestyTest')
41
               ->setSuffix('Jr');
42
43
        $this->getEntitySaver()->save($entity);
44
45
        $loaded = $this->getEntityManager()
46
                       ->getRepository($this->entityFqn)
47
                       ->findAll()[0];
48
        $this->assertSame($entity, $loaded);
49
    }
50
}
51