HostTestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFromNative() 0 14 1
1
<?php
2
3
/**
4
 * This file is part of the Cubiche/Web component.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Cubiche\Domain\Web\Tests\Units;
13
14
use Cubiche\Domain\System\Tests\Units\StringLiteralTests;
15
use Cubiche\Domain\Web\HostName;
16
use Cubiche\Domain\Web\IPAddress;
17
18
/**
19
 * HostTestCase class.
20
 *
21
 * Generated by TestGenerator on 2017-03-15 at 11:36:08.
22
 */
23
abstract class HostTestCase extends StringLiteralTests
24
{
25
    /*
26
     * Test fromNative method.
27
     */
28
    public function testFromNative()
29
    {
30
        $this
31
            ->given($valueObject = $this->fromNative($this->faker->ipv4))
32
            ->then()
33
                ->object($valueObject)
34
                    ->isInstanceOf(IPAddress::class)
35
            ->and()
36
            ->when($valueObject = $this->fromNative($this->faker->word))
37
            ->then()
38
                ->object($valueObject)
39
                    ->isInstanceOf(HostName::class)
40
        ;
41
    }
42
}
43