function NodeSaveTest::setUp

Same name in other branches
  1. 9 core/modules/node/tests/src/Functional/NodeSaveTest.php \Drupal\Tests\node\Functional\NodeSaveTest::setUp()
  2. 8.9.x core/modules/node/tests/src/Functional/NodeSaveTest.php \Drupal\Tests\node\Functional\NodeSaveTest::setUp()
  3. 11.x core/modules/node/tests/src/Functional/NodeSaveTest.php \Drupal\Tests\node\Functional\NodeSaveTest::setUp()

Overrides NodeTestBase::setUp

File

core/modules/node/tests/src/Functional/NodeSaveTest.php, line 36

Class

NodeSaveTest
Tests $node->save() for saving content.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create a user that is allowed to post; we'll use this to test the submission.
    $web_user = $this->drupalCreateUser([
        'create article content',
    ]);
    $this->drupalLogin($web_user);
    $this->webUser = $web_user;
}

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