WizardTestBase.php

Same filename in other branches
  1. 9 core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
  2. 8.9.x core/modules/views/src/Tests/Wizard/WizardTestBase.php
  3. 8.9.x core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
  4. 11.x core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php

Namespace

Drupal\Tests\views\Functional\Wizard

File

core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\views\Functional\Wizard;

use Drupal\Tests\views\Functional\ViewTestBase;

/**
 * Views UI wizard tests.
 */
abstract class WizardTestBase extends ViewTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'node',
        'views_ui',
        'block',
        'rest',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp($import_test_views = TRUE, $modules = []) : void {
        parent::setUp($import_test_views, $modules);
        // Create and log in a user with administer views permission.
        $views_admin = $this->drupalCreateUser([
            'administer views',
            'administer blocks',
            'bypass node access',
            'access user profiles',
            'view all revisions',
        ]);
        $this->drupalLogin($views_admin);
        $this->drupalPlaceBlock('local_actions_block');
    }

}

Classes

Title Deprecated Summary
WizardTestBase Views UI wizard tests.

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