You are here

public function PaymentMethodBaseTest::testRefundPaymentAccess in Payment 8.2

@covers ::refundPaymentAccess @covers ::doRefundPaymentAccess

File

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

Class

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

Namespace

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

Code

public function testRefundPaymentAccess() {
  $payment = $this
    ->getMockPayment();
  $account = $this
    ->createMock(AccountInterface::class);

  /** @var \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase|\PHPUnit\Framework\MockObject\MockObject $payment_method */
  $this->sut
    ->setPayment($payment);
  $access = $this->sut
    ->refundPaymentAccess($account);
  $this
    ->assertInstanceOf(AccessResultInterface::class, $access);
  $this
    ->assertFalse($access
    ->isAllowed());
}