You are here

protected function ViewTestBase::setUp in Views (for Drupal 7) 8.3

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

Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.

Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.

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.

Overrides WebTestBase::setUp

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

... See full list

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

... See full list

File

lib/Drupal/views/Tests/ViewTestBase.php, line 31
Definition of Drupal\views\Tests\ViewTestBase.

Class

ViewTestBase
Abstract class for views testing.

Namespace

Drupal\views\Tests

Code

protected function setUp() {
  parent::setUp();

  // @todo Remove this hack or move it to child classes.
  views_init();
  views_get_all_views(TRUE);
  menu_router_rebuild();
  $this->view = $this
    ->getBasicView();
}