You are here

public function TreeTest::testNodeTokens in Token 8

Tests if the token browser displays the node tokens.

File

tests/src/Functional/Tree/TreeTest.php, line 107

Class

TreeTest
Tests token tree page.

Namespace

Drupal\Tests\token\Functional\Tree

Code

public function testNodeTokens() {
  $this
    ->drupalGet($this
    ->getTokenTreeUrl([
    'token_types' => [
      'node',
    ],
  ]));
  $this
    ->assertTokenGroup('Nodes');
  $this
    ->assertTokenInTree('[node:body]', 'node');
  $this
    ->assertTokenInTree('[node:author:original:account-name]', 'node--author--original');
}