HiddenRegionTest.php in Display Suite 8.2
File
src/Tests/HiddenRegionTest.php
View source
<?php
namespace Drupal\ds\Tests;
class HiddenRegionTest extends FastTestBase {
public function testHiddenRegion() {
$edit = array(
'fs3[hidden_region]' => TRUE,
);
$this
->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
$this
->dsSelectLayout();
$settings = array(
'type' => 'article',
);
$node = $this
->drupalCreateNode($settings);
$fields = array(
'fields[body][region]' => 'right',
'fields[test_field][region]' => 'ds_hidden',
);
$this
->dsConfigureUi($fields);
$this
->drupalGet('node/' . $node
->id());
$this
->assertNoText('Test field plugin on node ' . $node
->id(), 'Test code field not found');
$fields = array(
'fields[body][region]' => 'right',
'fields[test_field][region]' => 'right',
);
$this
->dsConfigureUi($fields);
$this
->drupalGet('node/' . $node
->id());
$this
->assertText('Test field plugin on node ' . $node
->id(), 'Test code field not found');
}
}