You are here

public function NodeRevisionGenerateTest::setUp in Node Revision Delete 8

Same name in this branch
  1. 8 modules/node_revision_generate/tests/src/Functional/NodeRevisionGenerateTest.php \Drupal\Tests\node_revision_generate\Functional\NodeRevisionGenerateTest::setUp()
  2. 8 modules/node_revision_generate/tests/src/Unit/NodeRevisionGenerateTest.php \Drupal\Tests\node_revision_generate\Unit\NodeRevisionGenerateTest::setUp()

Overrides BrowserTestBase::setUp

File

modules/node_revision_generate/tests/src/Functional/NodeRevisionGenerateTest.php, line 37

Class

NodeRevisionGenerateTest
Test the node_revision_generate_generate_revisions form.

Namespace

Drupal\Tests\node_revision_generate\Functional

Code

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

  // Creating content types.
  $type = $this->container
    ->get('entity_type.manager')
    ->getStorage('node_type')
    ->create([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $type
    ->save();
  $type = $this->container
    ->get('entity_type.manager')
    ->getStorage('node_type')
    ->create([
    'type' => 'page',
    'name' => 'Page',
  ]);
  $type
    ->save();
}