コード例 #1
0
 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());
     }
 }
コード例 #2
0
 public function destroy($rowId)
 {
     ShoppingCart::remove($rowId);
     return ShoppingCart::content();
 }