Dumplie\CustomerService\Tests\Integration\Application\Generic\PaymentTestCase::test_create_payment PHP Method

test_create_payment() public method

public test_create_payment ( )
    function test_create_payment()
    {
        $orderId = OrderId::generate();
        $paymentId = PaymentId::generate();
        $this->customerServiceContext->customerPlacedOrder((string) $orderId);
        $command = new CreatePayment((string) $orderId, (string) $paymentId);
        $this->customerServiceContext->commandBus()->handle($command);
        $this->clear();
        $payment = $this->customerServiceContext->payments()->getById($paymentId);
        $this->assertFalse($payment->isPaid());
        $this->assertFalse($payment->isRejected());
    }