You are here

public function EntityTypeAlterTest::testTree in Workspace 8

File

tests/src/Functional/EntityTypeAlterTest.php, line 65

Class

EntityTypeAlterTest
Test the workspace entity.

Namespace

Drupal\Tests\workspace\Functional

Code

public function testTree() {
  $permissions = [
    'create_workspace',
    'edit_own_workspace',
    'view_own_workspace',
    'create test content',
    'view_revision_trees',
  ];
  $this
    ->createNodeType('Test', 'test');
  $clapton = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($clapton);
  $layla_node = $this
    ->createNodeThroughUI('Layla', 'test');
  $this
    ->drupalGet('/node/' . $layla_node
    ->id() . '/tree');
  $session = $this
    ->getSession();
  $this
    ->assertEquals(200, $session
    ->getStatusCode());
  $page = $session
    ->getPage();
  $page
    ->findLink($this
    ->truncateRev($layla_node->_rev->value));
}