You are here

protected function NodeSaveTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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 33

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;
}