You are here

public function NodeHelpTest::testNodeShowHelpText in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/node/src/Tests/NodeHelpTest.php \Drupal\node\Tests\NodeHelpTest::testNodeShowHelpText()

Verifies that help text appears on node add/edit forms.

File

core/modules/node/src/Tests/NodeHelpTest.php, line 69
Contains \Drupal\node\Tests\NodeHelpTest.

Class

NodeHelpTest
Tests help functionality for nodes.

Namespace

Drupal\node\Tests

Code

public function testNodeShowHelpText() {

  // Check the node add form.
  $this
    ->drupalGet('node/add/' . $this->testType);
  $this
    ->assertResponse(200);
  $this
    ->assertText($this->testText);

  // Create node and check the node edit form.
  $node = $this
    ->drupalCreateNode(array(
    'type' => $this->testType,
  ));
  $this
    ->drupalGet('node/' . $node
    ->id() . '/edit');
  $this
    ->assertResponse(200);
  $this
    ->assertText($this->testText);
}