NewViewConfigSchemaTest.php in Drupal 10
File
core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
View source
<?php
namespace Drupal\Tests\views_ui\Functional;
class NewViewConfigSchemaTest extends UITestBase {
protected static $modules = [
'views_ui',
'node',
'comment',
'file',
'taxonomy',
'dblog',
];
protected $defaultTheme = 'stark';
public function testNewViews() {
$this
->drupalLogin($this
->drupalCreateUser([
'administer views',
]));
$wizards = [
'node',
'node_revision',
'users',
'comment',
'file_managed',
'taxonomy_term',
'watchdog',
];
foreach ($wizards as $wizard_key) {
$edit = [];
$edit['label'] = $this
->randomString();
$edit['id'] = strtolower($this
->randomMachineName());
$edit['show[wizard_key]'] = $wizard_key;
$edit['description'] = $this
->randomString();
$this
->drupalGet('admin/structure/views/add');
$this
->submitForm($edit, 'Save and edit');
}
}
}