Coupon : Fix unit test

This commit is contained in:
gmorel
2013-12-29 14:47:51 +01:00
parent ae1a05eb85
commit 9a22bdafa1
7 changed files with 32 additions and 17 deletions

View File

@@ -134,6 +134,22 @@ class Coupon extends BaseCoupon
}
}
/**
* Set Coupon amount
*
* @param float $amount Amount deduced from the Cart
*
* @return $this
*/
public function setAmount($amount)
{
$effects = $this->unserializeEffects($this->getSerializedEffects());
$effects['amount'] = floatval($amount);
$this->setEffects($effects);
return $this;
}
/**
* Get the amount removed from the coupon to the cart
*