You are here

protected function RelationshipJoinTestBase::setUpFixtures in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php \Drupal\views\Tests\Plugin\RelationshipJoinTestBase::setUpFixtures()

Sets up the configuration and schema of views and views_test_data modules.

Because the schema of views_test_data.module is dependent on the test using it, it cannot be enabled normally.

Overrides ViewKernelTestBase::setUpFixtures

File

core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php, line 35
Contains \Drupal\views\Tests\Plugin\RelationshipJoinTestBase.

Class

RelationshipJoinTestBase
Provides a base class for a testing a relationship.

Namespace

Drupal\views\Tests\Plugin

Code

protected function setUpFixtures() {
  $this
    ->installEntitySchema('user');
  $this
    ->installConfig(array(
    'user',
  ));
  parent::setUpFixtures();

  // Create a record for uid 1.
  $this->rootUser = entity_create('user', array(
    'name' => $this
      ->randomMachineName(),
  ));
  $this->rootUser
    ->save();
  Views::viewsData()
    ->clear();
}