Dumplie\Inventory\Tests\AbstractInventoryContext::createCommandBus PHP Method

createCommandBus() protected method

protected createCommandBus ( Dumplie\SharedKernel\Tests\Context\CommandBusFactory $commandBusFactory, Dumplie\SharedKernel\Application\EventLog $eventLog, array $commandExtension = [] ) : Dumplie\SharedKernel\Application\CommandBus
$commandBusFactory Dumplie\SharedKernel\Tests\Context\CommandBusFactory
$eventLog Dumplie\SharedKernel\Application\EventLog
$commandExtension array
return Dumplie\SharedKernel\Application\CommandBus
    protected function createCommandBus(CommandBusFactory $commandBusFactory, EventLog $eventLog, array $commandExtension = []) : CommandBus
    {
        return $commandBusFactory->create([CreateProduct::class => new CreateProductHandler($this->products), PutBackProductToStock::class => new PutBackProductToStockHandler($this->products), RemoveProductFromStock::class => new RemoveProductFromStockHandler($this->products)], $commandExtension);
    }