Code Duplication    Length = 13-13 lines in 2 locations

tests/DMSDocumentCartTest.php 2 locations

@@ 109-121 (lines=13) @@
106
        $this->assertFalse($this->cart->isCartEmpty());
107
    }
108
109
    public function testRemoveItem()
110
    {
111
        $this->assertTrue($this->cart->isCartEmpty());
112
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
113
114
        $item = DMSRequestItem::create();
115
        $item->setDocument($doc)->setQuantity(2);
116
        $this->cart->addItem($item);
117
        $this->assertFalse($this->cart->isCartEmpty());
118
119
        $this->cart->removeItem($item);
120
        $this->assertTrue($this->cart->isCartEmpty());
121
    }
122
123
    public function testRemoveItemByID()
124
    {
@@ 123-135 (lines=13) @@
120
        $this->assertTrue($this->cart->isCartEmpty());
121
    }
122
123
    public function testRemoveItemByID()
124
    {
125
        $this->assertTrue($this->cart->isCartEmpty());
126
        $doc = $this->objFromFixture('DMSDocument', 'doc1');
127
128
        $item = DMSRequestItem::create();
129
        $item->setDocument($doc)->setQuantity(2);
130
        $this->cart->addItem($item);
131
        $this->assertFalse($this->cart->isCartEmpty());
132
133
        $this->cart->removeItemByID($doc->ID);
134
        $this->assertTrue($this->cart->isCartEmpty());
135
    }
136
137
    public function testUpdateItemQuantity()
138
    {