/** * Test decrease cartline quantity. * * @param mixed $quantityStart Starting quantity * @param mixed $quantityRemoved Quantity to remove * @param mixed $quantityEnd Quantity to check against * * @dataProvider dataDecreaseCartLineQuantity */ public function testDecreaseCartLineQuantity($quantityStart, $quantityRemoved, $quantityEnd) { $this->cartLine->setQuantity($quantityStart); $this->get('elcodi.manager.cart')->addPurchasable($this->cart, $this->cartLine->getPurchasable(), $this->cartLine->getQuantity()); $line = $this->cart->getCartLines()->last(); $this->get('elcodi.manager.cart')->decreaseCartLineQuantity($line, $quantityRemoved); $this->assertResults($quantityEnd); }