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 (#75)
by joseph
14:44
created

/AddressEmbeddableTest.php$0   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Geo;
4
5
use Doctrine\ORM\Mapping\ClassMetadata;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Objects\Geo\AddressEmbeddableInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Interfaces\ImplementNotifyChangeTrackingPolicyInterface;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\ImplementNotifyChangeTrackingPolicy;
9
use PHPUnit\Framework\TestCase;
10
11
/**
12
 * Class AddressEmbeddableTest
13
 *
14
 * @package EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Geo
15
 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
16
 */
17
class AddressEmbeddableTest extends TestCase
18
{
19
    /**
20
     * @test
21
     * @small
22
     * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Geo\AddressEmbeddable
23
     */
24
    public function itCanSetAndGetAllTheThings(): void
25
    {
26
        $expected = [
27
            AddressEmbeddableInterface::EMBEDDED_PROP_HOUSE_NUMBER => '1',
28
            AddressEmbeddableInterface::EMBEDDED_PROP_HOUSE_NAME   => 'home',
29
            AddressEmbeddableInterface::EMBEDDED_PROP_STREET       => 'streety street',
30
            AddressEmbeddableInterface::EMBEDDED_PROP_CITY         => 'Bradford',
31
            AddressEmbeddableInterface::EMBEDDED_PROP_POSTAL_AREA  => 'Shipley',
32
            AddressEmbeddableInterface::EMBEDDED_PROP_POSTAL_CODE  => 'BD17 7DB',
33
            AddressEmbeddableInterface::EMBEDDED_PROP_COUNTRY_CODE => 'GBR',
34
        ];
35
        $actual   = [];
36
37
        $address = new AddressEmbeddable();
38
        $address->setOwningEntity(new class() implements ImplementNotifyChangeTrackingPolicyInterface
39
        {
40
            private static $metaData;
41
42
            public function __construct()
43
            {
44
                self::$metaData = new ClassMetadata('anon');
45
            }
46
47
            use ImplementNotifyChangeTrackingPolicy;
48
        });
49
        foreach ($expected as $property => $value) {
50
            $setter = "set$property";
51
            $getter = "get$property";
52
            $address->$setter($value);
53
            $actual[$property] = $address->$getter();
54
        }
55
        self::assertSame($expected, $actual);
56
    }
57
}
58