You are here

function PaymentCaptureFormTest::testGetCancelUrl in Payment 8.2

@covers ::getCancelUrl

File

tests/src/Unit/Entity/Payment/PaymentCaptureFormTest.php, line 102

Class

PaymentCaptureFormTest
@coversDefaultClass \Drupal\payment\Entity\Payment\PaymentCaptureForm

Namespace

Drupal\Tests\payment\Unit\Entity\Payment

Code

function testGetCancelUrl() {
  $url = new Url($this
    ->randomMachineName());
  $this->payment
    ->expects($this
    ->atLeastOnce())
    ->method('toUrl')
    ->with('canonical')
    ->willReturn($url);
  $this
    ->assertSame($url, $this->sut
    ->getCancelUrl());
}