Passed
Push — main ( b1fbff...0e72dc )
by Johny
02:35
created

AddressTest   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 19
dl 0
loc 60
c 0
b 0
f 0
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DummyGenerator\Test\Extension;
6
7
use DummyGenerator\Container\DefinitionContainer;
8
use DummyGenerator\Core\Address;
9
use DummyGenerator\Core\Person;
10
use DummyGenerator\Definitions\Extension\AddressExtensionInterface;
11
use DummyGenerator\Definitions\Extension\PersonExtensionInterface;
12
use DummyGenerator\Definitions\Randomizer\RandomizerInterface;
13
use DummyGenerator\Definitions\Replacer\ReplacerInterface;
14
use DummyGenerator\Definitions\Transliterator\TransliteratorInterface;
15
use DummyGenerator\DummyGenerator;
16
use DummyGenerator\Core\Randomizer\Randomizer;
17
use DummyGenerator\Core\Replacer\Replacer;
18
use DummyGenerator\Core\Transliterator\Transliterator;
19
use PHPUnit\Framework\TestCase;
20
21
class AddressTest extends TestCase
22
{
23
    private DummyGenerator $generator;
24
25
    public function setUp(): void
26
    {
27
        parent::setUp();
28
29
        $container = new DefinitionContainer([]);
30
        $container->add(RandomizerInterface::class, Randomizer::class);
31
        $container->add(TransliteratorInterface::class, Transliterator::class);
32
        $container->add(ReplacerInterface::class, Replacer::class);
33
        $container->add(PersonExtensionInterface::class, Person::class);
34
        $container->add(AddressExtensionInterface::class, Address::class);
35
        $this->generator = new DummyGenerator($container);
36
    }
37
38
    public function testCitySuffix(): void
39
    {
40
        self::assertNotEmpty($this->generator->citySuffix());
41
    }
42
43
    public function testStreetSuffix(): void
44
    {
45
        self::assertNotEmpty($this->generator->streetSuffix());
46
    }
47
48
    public function testBuildingNumber(): void
49
    {
50
        self::assertNotEmpty($this->generator->buildingNumber());
51
    }
52
53
    public function testCity(): void
54
    {
55
        self::assertNotEmpty($this->generator->city());
56
    }
57
58
    public function testStreetName(): void
59
    {
60
        self::assertNotEmpty($this->generator->streetName());
61
    }
62
63
    public function testStreetAddress(): void
64
    {
65
        self::assertNotEmpty($this->generator->streetAddress());
66
    }
67
68
    public function testPostCode(): void
69
    {
70
        self::assertNotEmpty($this->generator->postcode());
71
    }
72
73
    public function testAddress(): void
74
    {
75
        self::assertNotEmpty($this->generator->address());
76
    }
77
78
    public function testCountry(): void
79
    {
80
        self::assertNotEmpty($this->generator->country());
81
    }
82
}
83