Dumplie\CustomerService\Tests\InMemory\InMemoryCustomerServiceContext::__construct PHP Method

__construct() public method

public __construct ( Dumplie\SharedKernel\Application\EventLog $eventLog, Dumplie\SharedKernel\Tests\Context\CommandBusFactory $commandBusFactory )
$eventLog Dumplie\SharedKernel\Application\EventLog
$commandBusFactory Dumplie\SharedKernel\Tests\Context\CommandBusFactory
    public function __construct(EventLog $eventLog, CommandBusFactory $commandBusFactory)
    {
        $this->orders = new InMemoryOrders();
        $this->payments = new InMemoryPayments();
        $this->transactionFactory = new Factory();
        $this->commandBus = $this->createCommandBus($commandBusFactory);
        $this->eventLog = $eventLog;
        $this->eventLog->subscribeFor(CustomerPlacedOrder::class, new NewOrderListener($this->orders));
    }
InMemoryCustomerServiceContext