Use a subscriber mock for unit tests

This commit is contained in:
Romain Neutron
2013-12-05 11:47:04 +01:00
parent 018e624298
commit 6587cb0000

View File

@@ -158,6 +158,10 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
return $generator;
}));
$app['translator'] = $this->createTranslatorMock();
$app['phraseanet.SE.subscriber'] = $this->getMock('Symfony\Component\EventDispatcher\EventSubscriberInterface');
$app['phraseanet.SE.subscriber']::staticExpects($this->any())
->method('getSubscribedEvents')
->will($this->returnValue([]));
$app['debug'] = true;