public function NewViewConfigSchemaTest::testNewViews in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php \Drupal\views_ui\Tests\NewViewConfigSchemaTest::testNewViews()
Tests creating brand new views.
File
- core/
modules/ views_ui/ src/ Tests/ NewViewConfigSchemaTest.php, line 29 - Contains \Drupal\views_ui\Tests\NewViewConfigSchemaTest.
Class
- NewViewConfigSchemaTest
- Tests configuration schema against new views.
Namespace
Drupal\views_ui\TestsCode
public function testNewViews() {
$this
->drupalLogin($this
->drupalCreateUser(array(
'administer views',
)));
// Create views with all core Views wizards.
$wizards = array(
// Wizard with their own classes.
'node',
'node_revision',
'users',
'comment',
'file_managed',
'taxonomy_term',
'watchdog',
// Standard derivative classes.
'standard:aggregator_feed',
'standard:aggregator_item',
);
foreach ($wizards as $wizard_key) {
$edit = array();
$edit['label'] = $this
->randomString();
$edit['id'] = strtolower($this
->randomMachineName());
$edit['show[wizard_key]'] = $wizard_key;
$edit['description'] = $this
->randomString();
$this
->drupalPostForm('admin/structure/views/add', $edit, t('Save and edit'));
}
}