Skip to content

Commit

Permalink
[All] make CoreShop 2.1 have Pimcore 5.7 at min requirement coreshop#3
Browse files Browse the repository at this point in the history
…- fix broken test
  • Loading branch information
dpfaffenbauer committed Mar 16, 2019
1 parent 3b01cbe commit 2541608
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Adding a new product with a simple quantity price rule
Then the product "Shoe" should be priced at "10000"

Scenario: Add a quantity price rule with no conditions
Given adding a quantity price rule to product "Shoe" named "default-product-quantity-price-rule"
Given adding a quantity price rule to product "Shoe" named "default-product-quantity-price-rule" and with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range from 0 to 10 with behaviour percentage-decrease of 10%
Then the quantity price rule should be valid for product "Shoe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,17 @@ public function __construct(
}

/**
* @Given /^adding a quantity price rule to (product "[^"]+") named "([^"]+)"$/
* @Given /^adding a quantity price rule to (product "[^"]+") named "([^"]+)" and with calculation-behaviour "([^"]+)"$/
*/
public function addingAProductSpecificPriceRuleToProduct(ProductInterface $product, $ruleName)
public function addingAProductQuantityPriceRuleToProduct(ProductInterface $product, $ruleName, $calculationBehaviourName)
{
/**
* @var ProductQuantityPriceRuleInterface $rule
*/
$rule = $this->productQuantityPriceRuleFactory->createNew();
$rule->setName($ruleName);
$rule->setProduct($product->getId());
$rule->setCalculationBehaviour($calculationBehaviourName);

$this->objectManager->persist($rule);
$this->objectManager->flush();
Expand Down

0 comments on commit 2541608

Please sign in to comment.