public function DisplayTest::testCloneDisplay in Views (for Drupal 7) 8.3
Tests the cloning of a display.
File
- lib/
Drupal/ views/ Tests/ UI/ DisplayTest.php, line 137 - Definition of Drupal\views\Tests\UI\DisplayTest.
Class
- DisplayTest
- Tests the handling of displays in the UI, adding removing etc.
Namespace
Drupal\views\Tests\UICode
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');
}