Code Duplication    Length = 10-10 lines in 4 locations

Tests/Units/EnumTests.php 4 locations

@@ 37-46 (lines=10) @@
34
    /**
35
     * Test value method.
36
     */
37
    public function testValue()
38
    {
39
        $this
40
            ->given($enum = new EnumFixture(EnumFixture::FOO))
41
            ->when($value = $enum->value())
42
            ->then()
43
                ->variable($value)
44
                    ->isEqualTo(EnumFixture::FOO)
45
        ;
46
    }
47
48
    /**
49
     * Test name method.
@@ 51-60 (lines=10) @@
48
    /**
49
     * Test name method.
50
     */
51
    public function testName()
52
    {
53
        $this
54
            ->given($enum = new EnumFixture(EnumFixture::FOO))
55
            ->when($name = $enum->name())
56
            ->then()
57
                ->variable($name)
58
                    ->isEqualTo('FOO')
59
        ;
60
    }
61
62
    /**
63
     * Test hashCode method.
@@ 65-74 (lines=10) @@
62
    /**
63
     * Test hashCode method.
64
     */
65
    public function testHashCode()
66
    {
67
        $this
68
            ->given($enum = new EnumFixture(EnumFixture::FOO))
69
            ->when($hashCode = $enum->hashCode())
70
            ->then()
71
                ->variable($hashCode)
72
                    ->isEqualTo((string) $enum->value())
73
        ;
74
    }
75
76
    /**
77
     * Test __toString method.
@@ 79-88 (lines=10) @@
76
    /**
77
     * Test __toString method.
78
     */
79
    public function testToString()
80
    {
81
        $this
82
            ->given($enum = new EnumFixture(EnumFixture::FOO))
83
            ->when($string = $enum->__toString())
84
            ->then()
85
                ->string($string)
86
                    ->isEqualTo((string) $enum->value())
87
        ;
88
    }
89
90
    /**
91
     * Test is method.