You are here

public function PaymentMethodBaseTest::testCapturePayment in Payment 8.2

@covers ::capturePayment @covers ::doCapturePayment

File

tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php, line 287

Class

PaymentMethodBaseTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\Method

Code

public function testCapturePayment() {
  $this
    ->expectException(\Exception::class);
  $payment = $this
    ->getMockPayment();
  $this->sut
    ->setPayment($payment);
  $result = $this->sut
    ->capturePayment();
  $this
    ->assertInstanceOf(OperationResultInterface::class, $result);
}