You are here

public function DefaultViewsTest::testPathDestination in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views_ui/src/Tests/DefaultViewsTest.php \Drupal\views_ui\Tests\DefaultViewsTest::testPathDestination()

Tests that page displays show the correct path.

File

core/modules/views_ui/src/Tests/DefaultViewsTest.php, line 185
Contains \Drupal\views_ui\Tests\DefaultViewsTest.

Class

DefaultViewsTest
Tests enabling, disabling, and reverting default views via the listing page.

Namespace

Drupal\views_ui\Tests

Code

public function testPathDestination() {
  $this
    ->drupalGet('admin/structure/views');

  // Check that links to views on default tabs are rendered correctly.
  $this
    ->assertLinkByHref('test_page_display_menu');
  $this
    ->assertNoLinkByHref('test_page_display_menu/default');
  $this
    ->assertLinkByHref('test_page_display_menu/local');

  // Check that a dynamic path is shown as text.
  $this
    ->assertRaw('test_route_with_suffix/%/suffix');
  $this
    ->assertNoLinkByHref(Url::fromUri('base:test_route_with_suffix/%/suffix')
    ->toString());
}