public function StorageTest::testDetails in Views (for Drupal 7) 8.3
Tests changing human_name, description and tag.
See also
views_ui_edit_details_form
File
- lib/
Drupal/ views/ Tests/ UI/ StorageTest.php, line 28 - Definition of Drupal\views\tests\UI\StorageTest.
Class
- StorageTest
- Tests the UI of storage properties of views.
Namespace
Drupal\views\Tests\UICode
public function testDetails() {
$view = $this
->getBasicView();
$path = "admin/structure/views/nojs/edit-details/{$view->storage->name}";
$edit = array(
'human_name' => $this
->randomName(),
'tag' => $this
->randomName(),
'description' => $this
->randomName(30),
);
$this
->drupalPost($path, $edit, t('Apply'));
$this
->drupalPost(NULL, array(), t('Save'));
$view = views_get_view($view->storage->name);
foreach (array(
'human_name',
'tag',
'description',
) as $property) {
$this
->assertEqual($view->storage->{$property}, $edit[$property], format_string('Make sure the property @property got probably saved.', array(
'@property' => $property,
)));
}
}