function EntityReferenceAdminTest::setUp
Same name in this branch
- 8.9.x core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceAdminTest::setUp()
Same name in other branches
- 9 core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\FunctionalJavascript\EntityReference\EntityReferenceAdminTest::setUp()
- 9 core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceAdminTest::setUp()
- 10 core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\FunctionalJavascript\EntityReference\EntityReferenceAdminTest::setUp()
- 10 core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceAdminTest::setUp()
- 11.x core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\FunctionalJavascript\EntityReference\EntityReferenceAdminTest::setUp()
- 11.x core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceAdminTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ field/ tests/ src/ FunctionalJavascript/ EntityReference/ EntityReferenceAdminTest.php, line 52
Class
- EntityReferenceAdminTest
- Tests for the administrative UI.
Namespace
Drupal\Tests\field\FunctionalJavascript\EntityReferenceCode
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('system_breadcrumb_block');
// Create a content type, with underscores.
$type_name = strtolower($this->randomMachineName(8)) . '_test';
$type = $this->drupalCreateContentType([
'name' => $type_name,
'type' => $type_name,
]);
$this->type = $type->id();
// Create test user.
$admin_user = $this->drupalCreateUser([
'access content',
'administer node fields',
'administer node display',
'administer views',
'create ' . $type_name . ' content',
'edit own ' . $type_name . ' content',
]);
$this->drupalLogin($admin_user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.