protected function RelationshipJoinTestBase::setUpFixtures in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::setUpFixtures()
- 10 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\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 ViewsKernelTestBase::setUpFixtures
File
- core/
modules/ views/ tests/ src/ Kernel/ Plugin/ RelationshipJoinTestBase.php, line 31
Class
- RelationshipJoinTestBase
- Provides a base class for a testing a relationship.
Namespace
Drupal\Tests\views\Kernel\PluginCode
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();
}