protected function ForwardRevisionNodeValidationTest::setUp in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/ForwardRevisionNodeValidationTest.php \Drupal\Tests\entity_hierarchy\Functional\ForwardRevisionNodeValidationTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ForwardRevisionNodeValidationTest.php, line 47
Class
- ForwardRevisionNodeValidationTest
- Defines a class for testing the warnings on edit form.
Namespace
Drupal\Tests\entity_hierarchy\FunctionalCode
protected function setUp() {
parent::setUp();
$content_type = $this
->drupalCreateContentType([
'type' => 'article',
]);
$content_type
->save();
$workflow = $this
->createEditorialWorkflow();
$this
->addEntityTypeAndBundleToWorkflow($workflow, static::ENTITY_TYPE, 'article');
$this
->setupEntityHierarchyField(static::ENTITY_TYPE, 'article', static::FIELD_NAME);
$this
->getEntityFormDisplay(static::ENTITY_TYPE, 'article', 'default')
->setComponent(self::FIELD_NAME, [
'type' => 'entity_reference_hierarchy_autocomplete',
'weight' => 20,
'settings' => [
'hide_weight' => TRUE,
] + EntityReferenceHierarchyAutocomplete::defaultSettings(),
])
->save();
$this
->additionalSetup();
}