You are here

public function WorkbenchAccessTestTrait::setUpContentType in Workbench Access 8

Set up a content type with workbench access enabled.

Return value

\Drupal\node\Entity\NodeType The node type entity.

3 calls to WorkbenchAccessTestTrait::setUpContentType()
DeleteRoleTest::testRoleDelete in tests/src/Functional/DeleteRoleTest.php
Tests that deleting a role clears their data from storage.
DeleteUserTest::testUserDelete in tests/src/Functional/DeleteUserTest.php
Tests that deleting a user clears their data from storage.
SectionTokenTest::setUp in tests/src/Kernel/SectionTokenTest.php

File

tests/src/Traits/WorkbenchAccessTestTrait.php, line 27

Class

WorkbenchAccessTestTrait
Contains helper classes for tests to set up various configuration.

Namespace

Drupal\Tests\workbench_access\Traits

Code

public function setUpContentType() {
  $node_type = $this
    ->createContentType([
    'type' => 'page',
  ]);
  return $node_type;
}