Code Duplication    Length = 9-12 lines in 2 locations

tests/DMSDocumentCartTest.php 2 locations

@@ 31-42 (lines=12) @@
28
        $this->assertFalse($this->cart->isCartEmpty());
29
    }
30
31
    public function testEmptyCart()
32
    {
33
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
34
        /** @var DMSRequestItem $item */
35
        $item = DMSRequestItem::create();
36
        $item->setDocument($doc)->setQuantity(18);
37
        $this->cart->addItem($item);
38
        $this->assertFalse($this->cart->isCartEmpty());
39
40
        $this->cart->emptyCart();
41
        $this->assertTrue($this->cart->isCartEmpty());
42
    }
43
44
    public function testGetBackend()
45
    {
@@ 169-177 (lines=9) @@
166
    }
167
168
169
    public function testIsInCart()
170
    {
171
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
172
        /** @var DMSRequestItem $item */
173
        $item = DMSRequestItem::create()->setDocument($doc)->setQuantity(2);
174
        $this->assertFalse($this->cart->isInCart($item->getItemId()));
175
        $this->cart->addItem($item);
176
        $this->assertTrue($this->cart->isInCart($item->getItemId()));
177
    }
178
}
179