diff --git a/tests/CommandBus/EventDispatchingCommandBusTest.php b/tests/CommandBus/EventDispatchingCommandBusTest.php index 41954b1..dbedf25 100644 --- a/tests/CommandBus/EventDispatchingCommandBusTest.php +++ b/tests/CommandBus/EventDispatchingCommandBusTest.php @@ -7,7 +7,7 @@ use HelloFresh\Engine\CommandBus\Exception\MissingHandlerException; use HelloFresh\Engine\CommandBus\Handler\InMemoryLocator; use HelloFresh\Engine\CommandBus\SimpleCommandBus; -use HelloFresh\Engine\EventDispatcher\EventDispatcher; +use HelloFresh\Engine\EventDispatcher\InMemoryDispatcher; use HelloFresh\Tests\Engine\Mock\InvalidHandler; use HelloFresh\Tests\Engine\Mock\TestCommand; use HelloFresh\Tests\Engine\Mock\TestHandler; @@ -28,7 +28,7 @@ protected function setUp() { $this->locator = new InMemoryLocator(); $simpleCommandBus = new SimpleCommandBus($this->locator); - $eventDispatcher = new EventDispatcher(); + $eventDispatcher = new InMemoryDispatcher(); $this->commandBus = new EventDispatchingCommandBus($simpleCommandBus, $eventDispatcher); } diff --git a/tests/EventDispatcher/EventDispatcherTest.php b/tests/EventDispatcher/EventDispatcherTest.php index ed82374..cd9fd61 100644 --- a/tests/EventDispatcher/EventDispatcherTest.php +++ b/tests/EventDispatcher/EventDispatcherTest.php @@ -2,7 +2,7 @@ namespace HelloFresh\Tests\Engine\EventBus; -use HelloFresh\Engine\EventDispatcher\EventDispatcher; +use HelloFresh\Engine\EventDispatcher\InMemoryDispatcher; use HelloFresh\Engine\EventDispatcher\EventDispatcherInterface; use HelloFresh\Tests\Engine\Mock\TracableEventListener; @@ -17,7 +17,7 @@ class EventDispatcherTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->dispatcher = new EventDispatcher(); + $this->dispatcher = new InMemoryDispatcher(); $this->listener1 = new TracableEventListener(); $this->listener2 = new TracableEventListener(); $this->assertFalse($this->listener1->isCalled());