Code Duplication    Length = 15-15 lines in 2 locations

Tests/Units/NumberTestCase.php 2 locations

@@ 215-229 (lines=15) @@
212
    /*
213
     * Test toReal.
214
     */
215
    public function testToReal()
216
    {
217
        $this
218
            ->given(
219
                $native = $this->randomNativeNumber(),
220
                $number = $this->fromNative($native)
221
            )
222
            ->when($real = $number->toReal())
223
            ->then
224
                ->object($real)
225
                    ->isInstanceOf(Real::class)
226
                ->variable($real->toNative())
227
                    ->isEqualTo((float) $native)
228
        ;
229
    }
230
231
    /*
232
     * Test toDecimal.
@@ 234-248 (lines=15) @@
231
    /*
232
     * Test toDecimal.
233
     */
234
    public function testToDecimal()
235
    {
236
        $this
237
            ->given(
238
                $native = $this->randomNativeNumber(),
239
                $number = $this->fromNative($native)
240
            )
241
            ->when($decimal = $number->toDecimal())
242
            ->then
243
                ->object($decimal)
244
                    ->isInstanceOf(Decimal::class)
245
                ->variable($decimal->toNative())
246
                    ->isEqualTo($native)
247
        ;
248
    }
249
250
    /*
251
     * Test isInfinite.