/** * Set up */ public function setUp() { parent::setUp(); $this->cart = $this->get('elcodi.factory.cart')->create(); $this->purchasable = $this->createPurchasable(); $this->cartLine = $this->get('elcodi.factory.cart_line')->create()->setPurchasable($this->purchasable)->setProductAmount($this->purchasable->getPrice())->setAmount($this->purchasable->getPrice())->setQuantity(1); $this->get('elcodi.event_dispatcher.cart')->dispatchCartLoadEvents($this->cart); }