Dumplie\CustomerService\Tests\AbstractCustomerServiceContext::createCommandBus PHP Method

createCommandBus() protected method

protected createCommandBus ( Dumplie\SharedKernel\Tests\Context\CommandBusFactory $commandBusFactory, array $commandExtensions = [] ) : Dumplie\SharedKernel\Application\CommandBus
$commandBusFactory Dumplie\SharedKernel\Tests\Context\CommandBusFactory
$commandExtensions array
return Dumplie\SharedKernel\Application\CommandBus
    protected function createCommandBus(CommandBusFactory $commandBusFactory, array $commandExtensions = []) : CommandBus
    {
        return $commandBusFactory->create([AcceptOrder::class => new AcceptOrderHandler($this->orders), CreatePayment::class => new CreatePaymentHandler($this->orders, $this->payments), PayPayment::class => new PayPaymentHandler($this->payments), RejectPayment::class => new RejectPaymentHandler($this->payments), PrepareOrder::class => new PrepareOrderHandler($this->orders), RefundOrder::class => new RefundOrderHandler($this->orders), RejectOrder::class => new RejectOrderHandler($this->orders), SendOrder::class => new SendOrderHandler($this->orders)], $commandExtensions);
    }