You are here

function PaymentMethodConfigurationDeleteFormTest::testGetCancelUrl in Payment 8.2

@covers ::getCancelUrl

File

tests/src/Unit/Entity/PaymentMethodConfiguration/PaymentMethodConfigurationDeleteFormTest.php, line 111

Class

PaymentMethodConfigurationDeleteFormTest
@coversDefaultClass \Drupal\payment\Entity\PaymentMethodConfiguration\PaymentMethodConfigurationDeleteForm

Namespace

Drupal\Tests\payment\Unit\Entity\PaymentMethodConfiguration

Code

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