You are here

protected function PaymentMethodBaseTest::getMockPayment in Payment 8.2

Creates a mock payment.

Return value

\Drupal\payment\Entity\PaymentInterface

9 calls to PaymentMethodBaseTest::getMockPayment()
PaymentMethodBaseTest::testBuildConfigurationForm in tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php
@covers ::buildConfigurationForm
PaymentMethodBaseTest::testCapturePayment in tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php
@covers ::capturePayment @covers ::doCapturePayment
PaymentMethodBaseTest::testCapturePaymentAccess in tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php
@covers ::capturePaymentAccess @covers ::doCapturePaymentAccess
PaymentMethodBaseTest::testExecutePayment in tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php
@covers ::executePayment @covers ::doExecutePayment
PaymentMethodBaseTest::testExecutePaymentAccess in tests/src/Unit/Plugin/Payment/Method/PaymentMethodBaseTest.php
@covers ::executePaymentAccess

... See full list

File

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

Class

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

Namespace

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

Code

protected function getMockPayment() {
  $payment = $this
    ->createMock(PaymentInterface::class);
  $payment
    ->expects($this
    ->any())
    ->method('getCacheContexts')
    ->willReturn([]);
  $payment
    ->expects($this
    ->any())
    ->method('getCacheTags')
    ->willReturn([]);
  return $payment;
}