protected function OptionsFieldUITest::setUp in Drupal 8
Same name and namespace in other branches
- 9 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();
}