public function test_it_removes_an_item_on_the_cart() { $this->addNewItem(); foreach (ShoppingCart::content() as $item) { ShoppingCart::remove($item->rowid); $this->assertEquals(0, ShoppingCart::count()); } }
public function destroy($rowId) { ShoppingCart::remove($rowId); return ShoppingCart::content(); }