protected function ReorderChildrenContentModerationFunctionalTest::setUp in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/ReorderChildrenContentModerationFunctionalTest.php \Drupal\Tests\entity_hierarchy\Functional\ReorderChildrenContentModerationFunctionalTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ReorderChildrenContentModerationFunctionalTest.php, line 48
Class
- ReorderChildrenContentModerationFunctionalTest
- Defines a class for testing the reorder children form.
Namespace
Drupal\Tests\entity_hierarchy\FunctionalCode
protected function setUp() {
parent::setUp();
$this
->placeBlock('local_tasks_block');
$this
->placeBlock('page_title_block');
$this
->setupEntityHierarchyField(static::ENTITY_TYPE, static::ENTITY_TYPE, static::FIELD_NAME);
$workflow = $this
->createEditorialWorkflow();
$workflow
->getTypePlugin()
->addEntityTypeAndBundle(static::ENTITY_TYPE, static::ENTITY_TYPE);
$workflow
->save();
// Force ContentModerationRouteSubscriber to fire, setting the latest revision as the default for the edit route.
\Drupal::service('router.builder')
->rebuild();
}