You are here

protected function NodeFormSaveChangedTimeTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php \Drupal\Tests\node\Functional\NodeFormSaveChangedTimeTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php, line 38

Class

NodeFormSaveChangedTimeTest
Tests updating the changed time after API and FORM entity save.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() {
  parent::setUp();

  // Create a node type.
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $this->authorUser = $this
    ->drupalCreateUser([
    'access content',
    'create article content',
    'edit any article content',
  ], 'author');
  $this
    ->drupalLogin($this->authorUser);

  // Create one node of the above node type .
  $this
    ->drupalCreateNode([
    'type' => 'article',
  ]);
}