You are here

protected function BlockContentTestBase::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/block_content/src/Tests/BlockContentTestBase.php \Drupal\block_content\Tests\BlockContentTestBase::setUp()
  2. 8 core/modules/block_content/src/Tests/Views/BlockContentTestBase.php \Drupal\block_content\Tests\Views\BlockContentTestBase::setUp()
Same name and namespace in other branches
  1. 8.0 core/modules/block_content/src/Tests/Views/BlockContentTestBase.php \Drupal\block_content\Tests\Views\BlockContentTestBase::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

1 call to BlockContentTestBase::setUp()
BlockContentFieldFilterTest::setUp in core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides BlockContentTestBase::setUp()
BlockContentFieldFilterTest::setUp in core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/block_content/src/Tests/Views/BlockContentTestBase.php, line 43
Contains \Drupal\block_content\Tests\Views\BlockContentTestBase.

Class

BlockContentTestBase
Base class for all block_content tests.

Namespace

Drupal\block_content\Tests\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);

  // Ensure the basic bundle exists. This is provided by the standard profile.
  $this
    ->createBlockContentType(array(
    'id' => 'basic',
  ));
  $this->adminUser = $this
    ->drupalCreateUser($this->permissions);
  if ($import_test_views) {
    ViewTestData::createTestViews(get_class($this), array(
      'block_content_test_views',
    ));
  }
}