Skip to content

Commit

Permalink
Merge pull request #151 from maxbaldanza/fix-phpspec-bootstrap
Browse files Browse the repository at this point in the history
Fix issue with phpspec bootstrapping not working
  • Loading branch information
ubick authored Jul 28, 2017
2 parents 76200b7 + 49d26a4 commit bb5b7e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/MageTest/PhpSpec/MagentoExtension/ExtensionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/MageTest/PhpSpec/MagentoExtension/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bb5b7e2

Please sign in to comment.