Code Duplication    Length = 13-13 lines in 2 locations

tests/DMSDocumentCartTest.php 2 locations

@@ 96-108 (lines=13) @@
93
        $this->assertFalse($this->cart->isCartEmpty());
94
    }
95
96
    public function testRemoveItem()
97
    {
98
        $this->assertTrue($this->cart->isCartEmpty());
99
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
100
        /** @var DMSRequestItem $item */
101
        $item = DMSRequestItem::create();
102
        $item->setDocument($doc)->setQuantity(2);
103
        $this->cart->addItem($item);
104
        $this->assertFalse($this->cart->isCartEmpty());
105
106
        $this->cart->removeItem($item);
107
        $this->assertTrue($this->cart->isCartEmpty());
108
    }
109
110
    public function testRemoveItemByID()
111
    {
@@ 110-122 (lines=13) @@
107
        $this->assertTrue($this->cart->isCartEmpty());
108
    }
109
110
    public function testRemoveItemByID()
111
    {
112
        $this->assertTrue($this->cart->isCartEmpty());
113
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
114
        /** @var DMSRequestItem $item */
115
        $item = DMSRequestItem::create();
116
        $item->setDocument($doc)->setQuantity(2);
117
        $this->cart->addItem($item);
118
        $this->assertFalse($this->cart->isCartEmpty());
119
120
        $this->cart->removeItemByID($doc->ID);
121
        $this->assertTrue($this->cart->isCartEmpty());
122
    }
123
124
    public function testUpdateItemQuantity()
125
    {