Inheritance: extends Dumplie\SharedKernel\Tests\Context\Context
Exemplo n.º 1
0
 function test_send_order()
 {
     $orderId = (string) Uuid::uuid4();
     $this->customerServiceContext->customerPlacedOrder($orderId);
     $acceptCommand = new AcceptOrder($orderId);
     $this->customerServiceContext->commandBus()->handle($acceptCommand);
     $prepareCommand = new PrepareOrder($orderId);
     $this->customerServiceContext->commandBus()->handle($prepareCommand);
     $sendCommand = new SendOrder($orderId);
     $this->customerServiceContext->commandBus()->handle($sendCommand);
 }
Exemplo n.º 2
0
 function test_reject_payment()
 {
     $orderId = OrderId::generate();
     $this->customerServiceContext->customerPlacedOrder((string) $orderId);
     $paymentId = $this->customerServiceContext->createPaymentFor($orderId);
     $command = new RejectPayment((string) $paymentId);
     $this->customerServiceContext->commandBus()->handle($command);
     $this->clear();
     $payment = $this->customerServiceContext->payments()->getById($paymentId);
     $this->assertTrue($payment->isRejected());
 }