You are here

public function ConfigEntityRevisionsRevertFormBaseTest::cancelUrlIsAsExpected in Config Entity Revisions 1.x

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php \Drupal\Tests\config_entity_revisions\Unit\ConfigEntityRevisionsRevertFormBaseTest::cancelUrlIsAsExpected()
  2. 8 tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php \Drupal\Tests\config_entity_revisions\Unit\ConfigEntityRevisionsRevertFormBaseTest::cancelUrlIsAsExpected()

Check that the cancel URL is as expected.

@test

File

tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php, line 245

Class

ConfigEntityRevisionsRevertFormBaseTest

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function cancelUrlIsAsExpected() {
  $this->instance = $this
    ->getMockInstance(300);
  $actual = $this->instance
    ->getCancelUrl();
  $this
    ->assertEquals('entity.my_entity_type.revisions', $actual
    ->getRouteName());
  $this
    ->assertEquals([
    'my_entity_type' => 'foozbar',
  ], $actual
    ->getRouteParameters());
}