public function DisplayTest::testCloneDisplay

Tests the cloning of a display.

File

drupal/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php, line 145
Definition of Drupal\views\Tests\UI\DisplayTest.

Class

DisplayTest
Tests the handling of displays in the UI, adding removing etc.

Namespace

Drupal\views\Tests\UI

Code

public function testCloneDisplay() {
  $view = $this
    ->randomView();
  $path_prefix = 'admin/structure/views/view/' . $view['name'] . '/edit';
  $this
    ->drupalGet($path_prefix);
  $this
    ->drupalPost(NULL, array(), 'clone Page');
  $this
    ->assertLinkByHref($path_prefix . '/page_1', 0, 'Make sure after cloning the new display appears in the UI');
}