Code Duplication    Length = 20-20 lines in 2 locations

tests/BasketTest.php 2 locations

@@ 304-323 (lines=20) @@
301
        $this->assertEquals($this->basket->totalItems(true), $adding);
302
    }
303
304
    public function testItemRemoval()
305
    {
306
        $this->basket->insert([
307
            'id'       => 'foo',
308
            'name'     => 'bar',
309
            'price'    => 100,
310
            'quantity' => 1,
311
            'weight'   => 200,
312
        ]);
313
314
        $contents = &$this->basket->contents();
315
316
        $this->assertNotEmpty($contents);
317
318
        foreach ($contents as $item) {
319
            $item->remove();
320
        }
321
322
        $this->assertEmpty($contents);
323
    }
324
325
    public function testAlternateItemRemoval()
326
    {
@@ 325-344 (lines=20) @@
322
        $this->assertEmpty($contents);
323
    }
324
325
    public function testAlternateItemRemoval()
326
    {
327
        $this->basket->insert([
328
            'id'       => 'foo',
329
            'name'     => 'bar',
330
            'price'    => 100,
331
            'quantity' => 1,
332
            'weight'   => 200,
333
        ]);
334
335
        $contents = &$this->basket->contents();
336
337
        $this->assertNotEmpty($contents);
338
339
        foreach ($contents as $identifier => $item) {
340
            $this->basket->remove($identifier);
341
        }
342
343
        $this->assertEmpty($contents);
344
    }
345
346
    public function testItemToArray()
347
    {