Exemple #1
0
 public function testUpdateCoupon()
 {
     $coupon1 = $this->dummyData->getCoupon();
     $coupon2 = $this->dummyData->getCoupon();
     $cart = new Cart();
     $cart->addCoupon($coupon1);
     $this->assertEntitiesEqual($coupon1, $cart->getCoupons()[0]);
     $cart->updateCoupon(0, $coupon2);
     $this->assertEntitiesEqual($coupon2, $cart->getCoupons()[0]);
 }