You are here

protected function FieldTestBase::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Tests/Views/FieldTestBase.php \Drupal\field\Tests\Views\FieldTestBase::setUp()

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 ViewTestBase::setUp

3 calls to FieldTestBase::setUp()
FieldApiDataTest::setUp in core/modules/views/src/Tests/FieldApiDataTest.php
Sets up a Drupal site for running functional and integration tests.
FieldUITest::setUp in core/modules/field/src/Tests/Views/FieldUITest.php
Sets up a Drupal site for running functional and integration tests.
HandlerFieldFieldTest::setUp in core/modules/field/src/Tests/Views/HandlerFieldFieldTest.php
Sets up a Drupal site for running functional and integration tests.
3 methods override FieldTestBase::setUp()
FieldApiDataTest::setUp in core/modules/views/src/Tests/FieldApiDataTest.php
Sets up a Drupal site for running functional and integration tests.
FieldUITest::setUp in core/modules/field/src/Tests/Views/FieldUITest.php
Sets up a Drupal site for running functional and integration tests.
HandlerFieldFieldTest::setUp in core/modules/field/src/Tests/Views/HandlerFieldFieldTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/field/src/Tests/Views/FieldTestBase.php, line 52
Contains \Drupal\field\Tests\Views\FieldTestBase.

Class

FieldTestBase
Provides some helper methods for testing fieldapi integration into views.

Namespace

Drupal\field\Tests\Views

Code

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

  // Ensure the page node type exists.
  entity_create('node_type', array(
    'type' => 'page',
    'name' => 'page',
  ))
    ->save();
  ViewTestData::createTestViews(get_class($this), array(
    'field_test_views',
  ));
}