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

HasAddressEmbeddableTraitIntegrationTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 46
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setup() 0 9 1
A theAddressEmbeddableCanBeSettedAndGetted() 0 6 1
A generatedCodePassesQa() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Geo;
4
5
use EdmondsCommerce\DoctrineStaticMeta\AbstractIntegrationTest;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Geo\HasAddressEmbeddableInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Geo\AddressEmbeddable;
8
9
class HasAddressEmbeddableTraitIntegrationTest extends AbstractIntegrationTest
10
{
11
    public const WORK_DIR = AbstractIntegrationTest::VAR_PATH.'/'
12
                            .self::TEST_TYPE.'/AddressEmbeddableTraitIntegrationTest';
13
14
    private const TEST_ENTITY = self::TEST_PROJECT_ROOT_NAMESPACE.'\\Entities\\Place';
15
16
    /**
17
     * @var HasAddressEmbeddableInterface
18
     */
19
    private $entity;
20
21
    public function setup()
22
    {
23
        parent::setup();
24
        $this->getEntityGenerator()->generateEntity(self::TEST_ENTITY);
25
        $this->getEntityEmbeddableSetter()
26
             ->setEntityHasEmbeddable(self::TEST_ENTITY, HasAddressEmbeddableTrait::class);
27
        $this->setupCopiedWorkDir();
28
        $entityFqn    = $this->getCopiedFqn(self::TEST_ENTITY);
29
        $this->entity = new $entityFqn;
30
    }
31
32
    /**
33
     * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
34
     * @throws \ReflectionException
35
     * @test
36
     * @medium
37
     * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Generator\Embeddable\EntityEmbeddableSetter
38
     */
39
    public function generatedCodePassesQa()
40
    {
41
        $this->assertTrue($this->qaGeneratedCode());
42
    }
43
44
    /**
45
     * @test
46
     * @medium
47
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Geo\HasAddressEmbeddableTrait
48
     */
49
    public function theAddressEmbeddableCanBeSettedAndGetted()
50
    {
51
        $expected = (new AddressEmbeddable())->setCity('integration test town');
52
        $this->entity->setAddressEmbeddable($expected);
53
        $actual = $this->entity->getAddressEmbeddable();
54
        $this->assertSame($expected, $actual);
55
    }
56
}
57