Skip to content

Commit

Permalink
tests(phpunit): fix failed tests due to event\dispatcher container
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelAlphonso committed Sep 21, 2022
1 parent adeec25 commit e56a5cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/admin/tests/Charcoal/Admin/ContainerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use League\CLImate\Util\Output;
use League\CLImate\Util\Reader\Stdin;
use League\CLImate\Util\UtilFactory;
use League\Event\EventDispatcher;

// From 'charcoal-factory'
use Charcoal\Factory\GenericFactory as Factory;
Expand Down Expand Up @@ -96,6 +97,7 @@ public function registerBaseServices(Container $container)
$this->registerDatabase($container);
$this->registerLogger($container);
$this->registerCache($container);
$this->registerEvent($container);
}

/**
Expand Down Expand Up @@ -379,6 +381,17 @@ public function registerCache(Container $container)
};
}

/**
* Setup event dispatcher.
*
* @param Container $container A DI container.
* @return void
*/
public function registerEvent(Container $container)
{
$container['event/dispatcher'] = new EventDispatcher();
}

/**
* @param Container $container A DI container.
* @return void
Expand Down Expand Up @@ -545,6 +558,7 @@ public function registerActionDependencies(Container $container)
$this->registerLogger($container);
$this->registerDatabase($container);
$this->registerCache($container);
$this->registerEvent($container);

$this->registerAdminConfig($container);
$this->registerBaseUrl($container);
Expand Down

0 comments on commit e56a5cb

Please sign in to comment.