Code Duplication    Length = 12-14 lines in 2 locations

tests/BasketTest.php 2 locations

@@ 297-308 (lines=12) @@
294
        $this->assertEmpty($contents);
295
    }
296
297
    public function testItemToArray(): void
298
    {
299
        $actualId = $this->basket->insert(new Item([
300
            'id'       => 'ase',
301
            'name'     => 'fly',
302
            'price'    => 160,
303
            'quantity' => 12,
304
            'weight'   => 123,
305
        ]));
306
307
        $this->assertTrue(is_array($this->basket->item($actualId)->toArray()));
308
    }
309
310
    public function testbasketToArray(): void
311
    {
@@ 310-323 (lines=14) @@
307
        $this->assertTrue(is_array($this->basket->item($actualId)->toArray()));
308
    }
309
310
    public function testbasketToArray(): void
311
    {
312
        $this->basket->insert(new Item([
313
            'id'       => 'asb',
314
            'name'     => 'shuttle',
315
            'price'    => 130,
316
            'quantity' => 11,
317
            'weight'   => 60,
318
        ]));
319
320
        foreach ($this->basket->contents(true) as $item) {
321
            $this->assertTrue(is_array($item));
322
        }
323
    }
324
325
    public function testTax(): void
326
    {