function OptionsFieldUITest::setUp

Same name in this branch
  1. 11.x core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
Same name in other branches
  1. 9 core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
  2. 8.9.x core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()
  3. 10 core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php \Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::setUp()
  4. 10 core/modules/options/tests/src/Functional/OptionsFieldUITest.php \Drupal\Tests\options\Functional\OptionsFieldUITest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php, line 67

Class

OptionsFieldUITest
Tests the Options field UI functionality.

Namespace

Drupal\Tests\options\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    // Create test user.
    $admin_user = $this->drupalCreateUser([
        'bypass node access',
        'administer node fields',
        'administer node display',
    ]);
    $this->drupalLogin($admin_user);
    $type = $this->drupalCreateContentType([
        'type' => 'plan',
    ]);
    $this->type = $type->id();
    $this->nodeFormPath = 'node/add/' . $this->type;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.