$container->
get('promotion_setgroup.repository'
),
$container->
get('promotion_discount.repository'
) );
} protected function getCart( PromotionFixtureBuilder
$promotionBuilder,
string
$productId1,
string
$productId2,
string
$code ): Cart
{ $promotionBuilder->
buildPromotion();
$cart =
$this->cartService->
getCart($this->context->
getToken(),
$this->context
);
// add 3 items to our cart
// the cheapest one 1x and 2x the other product
$cart =
$this->
addProduct($productId1, 2,
$cart,
$this->cartService,
$this->context
);
$cart =
$this->
addProduct($productId2, 1,
$cart,
$this->cartService,
$this->context
);
// add our promotion
$cart =
$this->
addPromotionCode($code,
$cart,
$this->cartService,
$this->context
);