fix broken tests
This commit is contained in:
@@ -205,7 +205,7 @@ class Cart implements EventSubscriberInterface
|
|||||||
$session->setCart($newCart->getId());
|
$session->setCart($newCart->getId());
|
||||||
|
|
||||||
$cartEvent = new CartEvent($newCart);
|
$cartEvent = new CartEvent($newCart);
|
||||||
$this->dispatcher->dispatch(TheliaEvents::CART_DUPLICATE, $newCart);
|
$this->dispatcher->dispatch(TheliaEvents::CART_DUPLICATE, $cartEvent);
|
||||||
|
|
||||||
return $cartEvent->cart;
|
return $cartEvent->cart;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,9 +50,13 @@ class CartTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->uniqid = uniqid('', true);
|
$this->uniqid = uniqid('', true);
|
||||||
|
|
||||||
|
$dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface");
|
||||||
|
|
||||||
$this->actionCart = $this->getMock(
|
$this->actionCart = $this->getMock(
|
||||||
"\Thelia\Action\Cart",
|
"\Thelia\Action\Cart",
|
||||||
array("generateCookie")
|
array("generateCookie"),
|
||||||
|
array($dispatcher)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->actionCart
|
$this->actionCart
|
||||||
|
|||||||
Reference in New Issue
Block a user