Adding/Refactoring unit test for ConditionFactory/ConditionManagerAbstract

This commit is contained in:
gmorel
2013-11-16 23:58:49 +01:00
parent 3a4bff634e
commit 5679f54ec0
6 changed files with 152 additions and 21 deletions

View File

@@ -124,7 +124,7 @@ class MatchForTotalAmountManager extends ConditionManagerAbstract
$this->isPriceValid($priceValue);
$this->IsCurrencyValid($currencyValue);
$this->isCurrencyValid($currencyValue);
$this->operators = array(
@@ -160,12 +160,12 @@ class MatchForTotalAmountManager extends ConditionManagerAbstract
}
$condition1 = $this->conditionValidator->variableOpComparison(
$this->adapter->getCartTotalPrice(),
$this->facade->getCartTotalPrice(),
$this->operators[self::INPUT1],
$this->values[self::INPUT1]
);
$condition2 = $this->conditionValidator->variableOpComparison(
$this->adapter->getCheckoutCurrency(),
$this->facade->getCheckoutCurrency(),
$this->operators[self::INPUT2],
$this->values[self::INPUT2]
);

View File

@@ -124,7 +124,7 @@ class MatchForXArticlesManager extends ConditionManagerAbstract
public function isMatching()
{
$condition1 = $this->conditionValidator->variableOpComparison(
$this->adapter->getNbArticlesInCart(),
$this->facade->getNbArticlesInCart(),
$this->operators[self::INPUT1],
$this->values[self::INPUT1]
);