Dumplie\CustomerService\Tests\CustomerServiceContext::payments PHP Method

payments() public method

public payments ( ) : Dumplie\CustomerService\Domain\Payments
return Dumplie\CustomerService\Domain\Payments
    public function payments() : Payments;

Usage Example

Example #1
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());
 }