Backup of db before drupal security update
[yaffs-website] / web / core / modules / views_ui / tests / src / Functional / NewViewConfigSchemaTest.php
1 <?php
2
3 namespace Drupal\Tests\views_ui\Functional;
4
5 /**
6  * Tests configuration schema against new views.
7  *
8  * @group views_ui
9  */
10 class NewViewConfigSchemaTest extends UITestBase {
11
12   /**
13    * Modules to enable.
14    *
15    * @var array
16    */
17   public static $modules = ['views_ui', 'node', 'comment', 'file', 'taxonomy', 'dblog', 'aggregator'];
18
19   /**
20    * Tests creating brand new views.
21    */
22   public function testNewViews() {
23     $this->drupalLogin($this->drupalCreateUser(['administer views']));
24
25     // Create views with all core Views wizards.
26     $wizards = [
27       // Wizard with their own classes.
28       'node',
29       'node_revision',
30       'users',
31       'comment',
32       'file_managed',
33       'taxonomy_term',
34       'watchdog',
35       // Standard derivative classes.
36       'standard:aggregator_feed',
37       'standard:aggregator_item',
38     ];
39     foreach ($wizards as $wizard_key) {
40       $edit = [];
41       $edit['label'] = $this->randomString();
42       $edit['id'] = strtolower($this->randomMachineName());
43       $edit['show[wizard_key]'] = $wizard_key;
44       $edit['description'] = $this->randomString();
45       $this->drupalPostForm('admin/structure/views/add', $edit, t('Save and edit'));
46     }
47   }
48
49 }