fix broken tests

This commit is contained in:
Manuel Raynaud
2013-08-02 16:16:04 +02:00
parent 9995daa158
commit 0b2bdd196f
2 changed files with 6 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ class Cart implements EventSubscriberInterface
$session->setCart($newCart->getId());
$cartEvent = new CartEvent($newCart);
$this->dispatcher->dispatch(TheliaEvents::CART_DUPLICATE, $newCart);
$this->dispatcher->dispatch(TheliaEvents::CART_DUPLICATE, $cartEvent);
return $cartEvent->cart;
}

View File

@@ -50,9 +50,13 @@ class CartTest extends \PHPUnit_Framework_TestCase
$this->uniqid = uniqid('', true);
$dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface");
$this->actionCart = $this->getMock(
"\Thelia\Action\Cart",
array("generateCookie")
array("generateCookie"),
array($dispatcher)
);
$this->actionCart