diff --git a/core/lib/Thelia/Tests/Action/CartTest.php b/core/lib/Thelia/Tests/Action/CartTest.php index 665182caa..ef1bdde4a 100644 --- a/core/lib/Thelia/Tests/Action/CartTest.php +++ b/core/lib/Thelia/Tests/Action/CartTest.php @@ -47,6 +47,10 @@ class CartTest extends \PHPUnit_Framework_TestCase { $container = new \Symfony\Component\DependencyInjection\ContainerBuilder(); + $dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface"); + + $container->set("event_dispatcher", $dispatcher); + return $container; } @@ -59,12 +63,8 @@ class CartTest extends \PHPUnit_Framework_TestCase $this->uniqid = uniqid('', true); - $dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface"); - $container = $this->getContainer(); - $container->set("event_dispatcher", $dispatcher); - $this->actionCart = $this->getMock( "\Thelia\Action\Cart", array("generateCookie", "redirect"),