protected function EntityUsageLayoutBuilderTest::setUp in Entity Usage 8.2
Same name in this branch
- 8.2 tests/src/Functional/EntityUsageLayoutBuilderTest.php \Drupal\Tests\entity_usage\Functional\EntityUsageLayoutBuilderTest::setUp()
- 8.2 tests/src/Kernel/EntityUsageLayoutBuilderTest.php \Drupal\Tests\entity_usage\Kernel\EntityUsageLayoutBuilderTest::setUp()
Same name and namespace in other branches
- 8.4 tests/src/Functional/EntityUsageLayoutBuilderTest.php \Drupal\Tests\entity_usage\Functional\EntityUsageLayoutBuilderTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ EntityUsageLayoutBuilderTest.php, line 50
Class
- EntityUsageLayoutBuilderTest
- Tests layout builder usage through Inline Blocks displays in UI.
Namespace
Drupal\Tests\entity_usage\FunctionalCode
protected function setUp() {
parent::setUp();
LayoutBuilderEntityViewDisplay::create([
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
'status' => TRUE,
])
->enableLayoutBuilder()
->setOverridable()
->save();
$this
->config('entity_usage.settings')
->set('local_task_enabled_entity_types', [
'entity_test',
])
->set('track_enabled_source_entity_types', [
'entity_test',
'block_content',
])
->set('track_enabled_target_entity_types', [
'entity_test',
'block_content',
])
->set('track_enabled_plugins', [
'layout_builder',
'entity_reference',
])
->save();
/** @var \Drupal\Core\Routing\RouteBuilderInterface $routerBuilder */
$routerBuilder = \Drupal::service('router.builder');
$routerBuilder
->rebuild();
}