function NewViewAggregatorConfigSchemaTest::testNewViews

Tests creating brand new views.

File

core/modules/aggregator/tests/src/Functional/views_ui/NewViewAggregatorConfigSchemaTest.php, line 33

Class

NewViewAggregatorConfigSchemaTest
Tests aggregator configuration schema against new views.

Namespace

Drupal\Tests\aggregator\Functional\views_ui

Code

public function testNewViews() {
    $this->drupalLogin($this->drupalCreateUser([
        'administer views',
    ]));
    // Create views with all standard derivative classes for Views wizards.
    $wizards = [
        'standard:aggregator_feed',
        'standard:aggregator_item',
    ];
    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');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.