Skip to content

Commit

Permalink
Fix static tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Mar 1, 2019
1 parent 11e5397 commit e516ebc
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public function setValidationFilter(
Address $address = null
) {
if (!$this->getFlag('validation_filter')) {

$this->prepareSelect($websiteId, $customerGroupId, $now);

$noCouponRules = $this->getNoCouponCodeSelect();
Expand All @@ -169,7 +168,7 @@ public function setValidationFilter(
$couponRules = $this->getCouponCodeSelect($couponCode);

$allAllowedRules = $this->getConnection()->select();
$allAllowedRules->union([$noCouponRules, $couponRules], \Zend_Db_Select::SQL_UNION_ALL);
$allAllowedRules->union([$noCouponRules, $couponRules], Select::SQL_UNION_ALL);

$wrapper = $this->getConnection()->select();
$wrapper->from($allAllowedRules);
Expand All @@ -189,9 +188,9 @@ public function setValidationFilter(
/**
* Recreate the default select object for specific needs of salesrule evaluation with coupon codes.
*
* @param $websiteId
* @param $customerGroupId
* @param $now
* @param int $websiteId
* @param int $customerGroupId
* @param string $now
*/
private function prepareSelect($websiteId, $customerGroupId, $now)
{
Expand Down Expand Up @@ -223,7 +222,7 @@ private function getNoCouponCodeSelect()
/**
* Determine all active rules that are valid for the given coupon code.
*
* @param $couponCode
* @param string $couponCode
* @return Select
*/
private function getCouponCodeSelect($couponCode)
Expand Down Expand Up @@ -260,7 +259,9 @@ private function getCouponCodeSelect($couponCode)
}

/**
* @param $couponCode
* Join coupong table to select.
*
* @param string $couponCode
* @param Select $couponSelect
*/
private function joinCouponTable($couponCode, Select $couponSelect)
Expand Down

0 comments on commit e516ebc

Please sign in to comment.