You are here

public function PaymentTypeBaseTest::testGetResumeContextResponse in Payment 8.2

@covers ::getResumeContextResponse

@depends testGetPayment

File

tests/src/Unit/Plugin/Payment/Type/PaymentTypeBaseTest.php, line 108

Class

PaymentTypeBaseTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\Type\PaymentTypeBase

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\Type

Code

public function testGetResumeContextResponse() {
  $response = $this
    ->createMock(ResponseInterface::class);
  $payment = $this
    ->createMock(PaymentInterface::class);
  $this->sut
    ->setPayment($payment);
  $this->sut
    ->expects($this
    ->atLeastOnce())
    ->method('doGetResumeContextResponse')
    ->willReturn($response);
  $this->eventDispatcher
    ->expects($this
    ->once())
    ->method('preResumeContext')
    ->with($payment);
  $this
    ->assertSame($response, $this->sut
    ->getResumeContextResponse());
}