function OptionsFieldUITest::setUp
Same name in other branches
- 9 core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
- 10 core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php \Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::setUp()
- 10 core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
- 11.x core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php \Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::setUp()
- 11.x core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ options/ tests/ src/ Functional/ OptionsFieldUITest.php, line 63
Class
- OptionsFieldUITest
- Tests the Options field UI functionality.
Namespace
Drupal\Tests\options\FunctionalCode
protected function setUp() {
parent::setUp();
// Create test user.
$admin_user = $this->drupalCreateUser([
'access content',
'administer taxonomy',
'access administration pages',
'administer site configuration',
'administer content types',
'administer nodes',
'bypass node access',
'administer node fields',
'administer node display',
]);
$this->drupalLogin($admin_user);
// Create content type, with underscores.
$this->typeName = 'test_' . strtolower($this->randomMachineName());
$type = $this->drupalCreateContentType([
'name' => $this->typeName,
'type' => $this->typeName,
]);
$this->type = $type->id();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.