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
18:31
created

HasAddressEmbeddableTraitFunctionalTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A theEntityCanBeSavedAndLoadedWithCorrectValues() 0 18 1
A setup() 0 8 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Geo;
4
5
use EdmondsCommerce\DoctrineStaticMeta\AbstractFunctionalTest;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Geo\HasAddressEmbeddableInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Interfaces\PrimaryKey\IdFieldInterface;
8
9
class HasAddressEmbeddableTraitFunctionalTest extends AbstractFunctionalTest
10
{
11
    public const WORK_DIR = self::VAR_PATH.'/'.self::TEST_TYPE.'/HasAddressEmbeddableTraitFunctionalTest';
12
13
    private const TEST_ENTITY = self::TEST_PROJECT_ROOT_NAMESPACE.'\\Entities\\Place';
14
15
    private $entityFqn;
16
17
    public function setup()
18
    {
19
        parent::setup();
20
        $this->getEntityGenerator()->generateEntity(self::TEST_ENTITY);
21
        $this->getEntityEmbeddableSetter()
22
             ->setEntityHasEmbeddable(self::TEST_ENTITY, HasAddressEmbeddableTrait::class);
23
        $this->setupCopiedWorkDirAndCreateDatabase();
24
        $this->entityFqn = $this->getCopiedFqn(self::TEST_ENTITY);
25
    }
26
27
    /**
28
     * @test
29
     * @large
30
     */
31
    public function theEntityCanBeSavedAndLoadedWithCorrectValues()
32
    {
33
        $entity = new $this->entityFqn;
34
        $entity->getAddressEmbeddable()
35
               ->setCity('the city')
36
               ->setCountryCode('ABC')
37
               ->setHouseName('foo')
38
               ->setHouseNumber('345')
39
               ->setPostalArea('cheese land')
40
               ->setPostalCode('ABC 123')
41
               ->setStreet('streety street');
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