protected function UITestBase::setUp

Sets up a Drupal site for running functional and integration tests.

Generates a random database prefix and installs Drupal with the specified installation profile in Drupal\simpletest\WebTestBase::$profile into the prefixed database. Afterwards, installs any additional modules specified by the test.

After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides ViewTestBase::setUp

See also

Drupal\simpletest\WebTestBase::prepareDatabasePrefix()

Drupal\simpletest\WebTestBase::changeDatabasePrefix()

Drupal\simpletest\WebTestBase::prepareEnvironment()

1 call to UITestBase::setUp()
ExposedFormUITest::setUp in drupal/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides UITestBase::setUp()
ExposedFormUITest::setUp in drupal/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
Sets up a Drupal site for running functional and integration tests.

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php, line 38
Contains \Drupal\views_ui\Tests\UITestBase.

Class

UITestBase
Provides a base class for testing the Views UI.

Namespace

Drupal\views_ui\Tests

Code

protected function setUp() {
  parent::setUp();
  $this
    ->enableViewsTestModule();
  $this->adminUser = $this
    ->drupalCreateUser(array(
    'administer views',
  ));
  $this->fullAdminUser = $this
    ->drupalCreateUser(array(
    'administer views',
    'administer blocks',
    'bypass node access',
    'access user profiles',
    'view all revisions',
  ));
  $this
    ->drupalLogin($this->fullAdminUser);
}