Move events handling to Symfony\EventDispatcher

This commit is contained in:
Frédéric Guillot
2014-12-27 19:10:38 -05:00
parent cf821e117c
commit 17dc5bdc9e
75 changed files with 1076 additions and 1167 deletions

View File

@@ -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()