function RelationshipJoinTestBase::setUpFixtures

Same name in other branches
  1. 8.9.x core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::setUpFixtures()
  2. 10 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::setUpFixtures()
  3. 11.x core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::setUpFixtures()

File

core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php, line 32

Class

RelationshipJoinTestBase
Provides a base class for a testing a relationship.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

protected function setUpFixtures() {
    $this->installEntitySchema('user');
    $this->installConfig([
        'user',
    ]);
    parent::setUpFixtures();
    // Create a record for uid 1.
    $this->rootUser = User::create([
        'name' => $this->randomMachineName(),
    ]);
    $this->rootUser
        ->save();
    Views::viewsData()->clear();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.