You are here

protected function EntityFieldQueryViewsTestBase::setUp in EntityFieldQuery Views Backend 8

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

1 call to EntityFieldQueryViewsTestBase::setUp()
EntityFieldQueryViewsTermTest::setUp in src/Tests/EntityFieldQueryViewsTermTest.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides EntityFieldQueryViewsTestBase::setUp()
EntityFieldQueryViewsTermTest::setUp in src/Tests/EntityFieldQueryViewsTermTest.php
Sets up a Drupal site for running functional and integration tests.

File

src/Tests/EntityFieldQueryViewsTestBase.php, line 40
Tests for EFQ Views query features.

Class

EntityFieldQueryViewsTestBase
Abstract class for EFQ views testing.

Namespace

Drupal\efq_views\Tests

Code

protected function setUp() {
  if (module_exists('mongodb') || ($module_data = system_rebuild_module_data()) && isset($module_data['mongodb'])) {
    variable_set('field_storage_default', 'mongodb_field_storage');
    parent::setUp('mongodb_field_storage', 'efq_views_test');
    $this
      ->pass('Running MongoDB');
  }
  else {
    parent::setUp('efq_views_test');
    $this
      ->pass('Running MySQL');
  }
  if (empty($this->postponeFields)) {
    $this
      ->saveFieldsEntities();
  }
}