Dumplie\Customer\Tests\AbstractCustomerContext::createCommandBus PHP Method

createCommandBus() protected method

protected createCommandBus ( Dumplie\SharedKernel\Application\EventLog $eventLog, Dumplie\SharedKernel\Tests\Context\CommandBusFactory $commandBusFactory, array $commandExtension = [] ) : Dumplie\SharedKernel\Application\CommandBus
$eventLog Dumplie\SharedKernel\Application\EventLog
$commandBusFactory Dumplie\SharedKernel\Tests\Context\CommandBusFactory
$commandExtension array
return Dumplie\SharedKernel\Application\CommandBus
    protected function createCommandBus(EventLog $eventLog, CommandBusFactory $commandBusFactory, array $commandExtension = []) : CommandBus
    {
        return $commandBusFactory->create([AddToCart::class => new AddToCartHandler($this->products, $this->carts), ChangeBillingAddress::class => new ChangeBillingAddressHandler($this->checkouts), ChangeShippingAddress::class => new ChangeShippingAddressHandler($this->checkouts), CreateCart::class => new CreateCartHandler($this->carts), NewCheckout::class => new NewCheckoutHandler($this->checkouts, $this->carts), PlaceOrder::class => new PlaceOrderHandler($this->carts, $this->products, $this->checkouts, $this->orders, $eventLog), RemoveFromCart::class => new RemoveFromCartHandler($this->carts)], $commandExtension);
    }