diff --git a/spec/MageTest/PhpSpec/MagentoExtension/ExtensionSpec.php b/spec/MageTest/PhpSpec/MagentoExtension/ExtensionSpec.php index d71e5cc..94a3577 100644 --- a/spec/MageTest/PhpSpec/MagentoExtension/ExtensionSpec.php +++ b/spec/MageTest/PhpSpec/MagentoExtension/ExtensionSpec.php @@ -21,7 +21,7 @@ */ namespace spec\MageTest\PhpSpec\MagentoExtension; -use MageTest\PhpSpec\MagentoExtension\Listener\BootstrapListener; +use MageTest\PhpSpec\MagentoExtension\Listener\RegisterAutoloaderListener; use PhpSpec\ObjectBehavior; use PhpSpec\Process\Context\ExecutionContext; use PhpSpec\ServiceContainer; @@ -170,7 +170,7 @@ function it_registers_a_mage_controller_specification_generator_when_loaded( function it_adds_event_dispatcher_when_loaded($container) { - $container->define('event_dispatcher.listeners.bootstrap', $this->service(BootstrapListener::class, $container), ['event_dispatcher.listeners'])->shouldBeCalled(); + $container->define('event_dispatcher.listeners.register_autoloader', $this->service(RegisterAutoloaderListener::class, $container), ['event_dispatcher.listeners'])->shouldBeCalled(); $this->load($container); } diff --git a/src/MageTest/PhpSpec/MagentoExtension/Extension.php b/src/MageTest/PhpSpec/MagentoExtension/Extension.php index 88b9801..a242f3b 100644 --- a/src/MageTest/PhpSpec/MagentoExtension/Extension.php +++ b/src/MageTest/PhpSpec/MagentoExtension/Extension.php @@ -103,8 +103,8 @@ private function setUtils(ServiceContainer $container) private function setEvents(ServiceContainer $container, MageLocator $configuration) { - $container->define('event_dispatcher.listeners.bootstrap', function () use ($configuration) { - return new Listener\BootstrapListener($configuration); + $container->define('event_dispatcher.listeners.register_autoloader', function () use ($configuration) { + return new Listener\RegisterAutoloaderListener($configuration); }, ['event_dispatcher.listeners']); $container->define('event_dispatcher.listeners.module_update', function ($c) { diff --git a/src/MageTest/PhpSpec/MagentoExtension/Listener/BootstrapListener.php b/src/MageTest/PhpSpec/MagentoExtension/Listener/RegisterAutoloaderListener.php similarity index 91% rename from src/MageTest/PhpSpec/MagentoExtension/Listener/BootstrapListener.php rename to src/MageTest/PhpSpec/MagentoExtension/Listener/RegisterAutoloaderListener.php index 6c63ada..dd2dc3d 100644 --- a/src/MageTest/PhpSpec/MagentoExtension/Listener/BootstrapListener.php +++ b/src/MageTest/PhpSpec/MagentoExtension/Listener/RegisterAutoloaderListener.php @@ -6,7 +6,7 @@ use MageTest\PhpSpec\MagentoExtension\Configuration\MageLocator; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -class BootstrapListener implements EventSubscriberInterface +class RegisterAutoloaderListener implements EventSubscriberInterface { private $configuration;