protected function ViewTestBase::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 WebTestBase::setUp

See also

Drupal\simpletest\WebTestBase::prepareDatabasePrefix()

Drupal\simpletest\WebTestBase::changeDatabasePrefix()

Drupal\simpletest\WebTestBase::prepareEnvironment()

25 calls to ViewTestBase::setUp()
AccessTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
Sets up a Drupal site for running functional and integration tests.
AnalyzeTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/AnalyzeTest.php
Sets up a Drupal site for running functional and integration tests.
ApiDataTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Field/ApiDataTest.php
Sets up a Drupal site for running functional and integration tests.
AreaTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php
Sets up a Drupal site for running functional and integration tests.
ArgumentDefaultTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

25 methods override ViewTestBase::setUp()
AccessTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
Sets up a Drupal site for running functional and integration tests.
AnalyzeTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/AnalyzeTest.php
Sets up a Drupal site for running functional and integration tests.
ApiDataTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Field/ApiDataTest.php
Sets up a Drupal site for running functional and integration tests.
AreaTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php
Sets up a Drupal site for running functional and integration tests.
ArgumentDefaultTest::setUp in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

File

drupal/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php, line 31
Contains \Drupal\views\Tests\ViewTestBase.

Class

ViewTestBase
Defines a base class for Views testing in the full web test environment.

Namespace

Drupal\views\Tests

Code

protected function setUp() {
  parent::setUp();
  ViewTestData::importTestViews(get_class($this));
}