Code Duplication    Length = 12-12 lines in 4 locations

Tests/Units/EmailAddressTests.php 1 location

@@ 60-71 (lines=12) @@
57
    /**
58
     * Test isEmpty method.
59
     */
60
    public function testIsEmpty()
61
    {
62
        $this
63
            ->given($email = EmailAddress::fromNative($this->randomNativeValue()))
64
            ->then()
65
                ->boolean($email->isEmpty())
66
                    ->isFalse()
67
            ->exception(function () {
68
                EmailAddress::fromNative('');
69
            })->isInstanceOf(\InvalidArgumentException::class)
70
        ;
71
    }
72
73
    /**
74
     * Test IsValid method.

Tests/Units/HostNameTests.php 1 location

@@ 42-53 (lines=12) @@
39
    /**
40
     * Test isEmpty method.
41
     */
42
    public function testIsEmpty()
43
    {
44
        $this
45
            ->given($email = HostName::fromNative($this->randomNativeValue()))
46
            ->then()
47
                ->boolean($email->isEmpty())
48
                    ->isFalse()
49
                ->exception(function () {
50
                    HostName::fromNative('');
51
                })->isInstanceOf(\InvalidArgumentException::class)
52
            ;
53
    }
54
55
    /**
56
     * Test IsValid method.

Tests/Units/IPAddressTests.php 1 location

@@ 58-69 (lines=12) @@
55
    /**
56
     * Test isEmpty method.
57
     */
58
    public function testIsEmpty()
59
    {
60
        $this
61
            ->given($email = IPAddress::fromNative($this->randomNativeValue()))
62
            ->then()
63
                ->boolean($email->isEmpty())
64
                    ->isFalse()
65
                ->exception(function () {
66
                    IPAddress::fromNative('');
67
                })->isInstanceOf(\InvalidArgumentException::class)
68
        ;
69
    }
70
}
71

Tests/Units/UrlTests.php 1 location

@@ 63-74 (lines=12) @@
60
    /**
61
     * Test isEmpty method.
62
     */
63
    public function testIsEmpty()
64
    {
65
        $this
66
            ->given($url = Url::fromNative($this->randomNativeValue()))
67
            ->then()
68
                ->boolean($url->isEmpty())
69
                    ->isFalse()
70
                ->exception(function () {
71
                    Url::fromNative('');
72
                })->isInstanceOf(\InvalidArgumentException::class)
73
        ;
74
    }
75
76
    /**
77
     * Test Host method.