You are here

public function PaymentMethodBaseTest::testCapturePaymentAccess in Payment 8.2

@covers ::capturePaymentAccess @covers ::doCapturePaymentAccess

File

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

Class

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

Namespace

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

Code

public function testCapturePaymentAccess() {
  $payment = $this
    ->getMockPayment();
  $account = $this
    ->createMock(AccountInterface::class);
  $this->sut
    ->setPayment($payment);
  $access = $this->sut
    ->capturePaymentAccess($account);
  $this
    ->assertInstanceOf(AccessResultInterface::class, $access);
  $this
    ->assertFalse($access
    ->isAllowed());
}