function ViewsDataIntegrationTest::setUp
Same name in other branches
- 8.9.x core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php \Drupal\Tests\content_moderation\Kernel\ViewsDataIntegrationTest::setUp()
- 10 core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php \Drupal\Tests\content_moderation\Kernel\ViewsDataIntegrationTest::setUp()
- 11.x core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php \Drupal\Tests\content_moderation\Kernel\ViewsDataIntegrationTest::setUp()
Overrides ViewsKernelTestBase::setUp
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ViewsDataIntegrationTest.php, line 34
Class
- ViewsDataIntegrationTest
- Tests the views integration of content_moderation.
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function setUp($import_test_views = TRUE) : void {
parent::setUp($import_test_views);
$this->installEntitySchema('node');
$this->installEntitySchema('entity_test_mulrevpub');
$this->installEntitySchema('user');
$this->installEntitySchema('content_moderation_state');
$this->installSchema('node', 'node_access');
$this->installConfig('content_moderation');
$node_type = NodeType::create([
'type' => 'page',
]);
$node_type->save();
$workflow = $this->createEditorialWorkflow();
$workflow->getTypePlugin()
->addEntityTypeAndBundle('node', 'page');
$workflow->getTypePlugin()
->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub');
$workflow->save();
$this->installConfig('content_moderation_test_views');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.