/** * Test quantity setter, if quantity is negative, must returns a quantity of 1 */ public function testNegativeQuantity() { $basketElement = new BasketElement(); $basketElement->setQuantity(50); $this->assertEquals(50, $basketElement->getQuantity()); $basketElement->setQuantity(-50); $this->assertEquals(1, $basketElement->getQuantity()); }