diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
commit | 17dc5bdc9ede52ad618bbf326e67e3b6988170f7 (patch) | |
tree | 9cf4d325667f11fa735bca84042fb385e3273329 /tests/units/Base.php | |
parent | cf821e117ce8b937cff7f386a107aaa81ba6bf9b (diff) |
Move events handling to Symfony\EventDispatcher
Diffstat (limited to 'tests/units/Base.php')
-rw-r--r-- | tests/units/Base.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/units/Base.php b/tests/units/Base.php index 27960610..3e491969 100644 --- a/tests/units/Base.php +++ b/tests/units/Base.php @@ -3,6 +3,10 @@ require __DIR__.'/../../vendor/autoload.php'; require __DIR__.'/../../app/constants.php'; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; +use Symfony\Component\Stopwatch\Stopwatch; + date_default_timezone_set('UTC'); abstract class Base extends PHPUnit_Framework_TestCase @@ -23,8 +27,13 @@ abstract class Base extends PHPUnit_Framework_TestCase } $this->container = new Pimple\Container; - $this->container->register(new ServiceProvider\Database); - $this->container->register(new ServiceProvider\Event); + $this->container->register(new ServiceProvider\DatabaseProvider); + $this->container->register(new ServiceProvider\ModelProvider); + + $this->container['dispatcher'] = new TraceableEventDispatcher( + new EventDispatcher, + new Stopwatch + ); } public function tearDown() |