CloneTest.php in Display Suite 8.3
File
tests/src/Functional/CloneTest.php
View source
<?php
namespace Drupal\Tests\ds\Functional;
class CloneTest extends TestBase {
use DsTestTrait;
public static $modules = [
'node',
'user',
'comment',
'field_ui',
'ds',
];
public function testClone() {
$this
->dsSelectLayout([], [], 'admin/structure/types/manage/article/display/teaser');
$this
->assertSession()
->pageTextContains('Two column stacked layout');
$this
->drupalGet('admin/structure/types/manage/article/display');
$page = $this
->getSession()
->getPage();
$button = $page
->findById('edit-clone-submit');
$button
->click();
$this
->assertSession()
->pageTextContains('The layout has been cloned.');
$option_field = $this
->assertSession()
->optionExists('edit-ds-layout', 'ds_2col_stacked');
$this
->assertTrue($option_field
->hasAttribute('selected'));
}
}
Classes
Name |
Description |
CloneTest |
Tests for the manage display tab in Display Suite. |