function ManageFieldsTest::setUp
Overrides BrowserTestBase::setUp
File
-
core/
modules/ field_ui/ tests/ src/ FunctionalJavascript/ ManageFieldsTest.php, line 58
Class
- ManageFieldsTest
- Tests the Field UI "Manage Fields" screens.
Namespace
Drupal\Tests\field_ui\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$this->drupalPlaceBlock('system_breadcrumb_block');
$this->drupalPlaceBlock('local_tasks_block');
$this->drupalPlaceBlock('local_actions_block');
// Create a test user.
$admin_user = $this->drupalCreateUser([
'access content',
'administer content types',
'administer node fields',
]);
$this->drupalLogin($admin_user);
$type = $this->drupalCreateContentType([
'name' => 'Article',
'type' => 'article',
]);
$this->type = $type->id();
$type2 = $this->drupalCreateContentType([
'name' => 'Basic Page',
'type' => 'page',
]);
$this->type2 = $type2->id();
$this->entityTypeManager = $this->container
->get('entity_type.manager');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.