Code Duplication    Length = 13-14 lines in 4 locations

Tests/Units/IntegerTests.php 2 locations

@@ 148-161 (lines=14) @@
145
    /*
146
     * Test isEven.
147
     */
148
    public function testIsEven()
149
    {
150
        $this
151
            ->given(
152
                $number1 = $this->fromNative(2),
153
                $number2 = $this->fromNative(3)
154
            )
155
            ->then
156
                ->boolean($number1->isEven())
157
                    ->isTrue()
158
                ->boolean($number2->isEven())
159
                    ->isFalse()
160
        ;
161
    }
162
163
    /*
164
     * Test isOdd.
@@ 166-179 (lines=14) @@
163
    /*
164
     * Test isOdd.
165
     */
166
    public function testIsOdd()
167
    {
168
        $this
169
            ->given(
170
                $number1 = $this->fromNative(2),
171
                $number2 = $this->fromNative(3)
172
            )
173
            ->then
174
                ->boolean($number1->isOdd())
175
                    ->isFalse()
176
                ->boolean($number2->isOdd())
177
                    ->isTrue()
178
        ;
179
    }
180
}
181

Tests/Units/NumberTestCase.php 1 location

@@ 759-771 (lines=13) @@
756
    /*
757
     * Test div special cases.
758
     */
759
    public function testDivSpecialCases()
760
    {
761
        $this
762
            ->given(
763
                $zero = $this->fromNative(0),
764
                $number = $this->fromNative($this->randomNativeNumber())
765
            )
766
            ->then
767
                ->boolean(
768
                    $zero->div($number)->equals($zero)
769
                )->isTrue()
770
        ;
771
    }
772
773
    /*
774
     * Test pow.

Tests/Units/StringLiteralTests.php 1 location

@@ 58-71 (lines=14) @@
55
    /**
56
     * Test isEmpty method.
57
     */
58
    public function testIsEmpty()
59
    {
60
        $this
61
            ->given(
62
                $literal = $this->fromNative($this->randomNativeValue()),
63
                $emptyLiteral = $this->fromNative('')
64
            )
65
            ->then
66
                ->boolean($literal->isEmpty())
67
                    ->isFalse()
68
                ->boolean($emptyLiteral->isEmpty())
69
                    ->isTrue()
70
        ;
71
    }
72
}
73