function NodeHelpTest::testNodeShowHelpText
Same name in other branches
- 9 core/modules/node/tests/src/Functional/NodeHelpTest.php \Drupal\Tests\node\Functional\NodeHelpTest::testNodeShowHelpText()
- 10 core/modules/node/tests/src/Functional/NodeHelpTest.php \Drupal\Tests\node\Functional\NodeHelpTest::testNodeShowHelpText()
- 11.x core/modules/node/tests/src/Functional/NodeHelpTest.php \Drupal\Tests\node\Functional\NodeHelpTest::testNodeShowHelpText()
Verifies that help text appears on node add/edit forms.
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeHelpTest.php, line 69
Class
- NodeHelpTest
- Tests help functionality for nodes.
Namespace
Drupal\Tests\node\FunctionalCode
public function testNodeShowHelpText() {
// Check the node add form.
$this->drupalGet('node/add/' . $this->testType);
$this->assertSession()
->statusCodeEquals(200);
$this->assertText($this->testText);
// Create node and check the node edit form.
$node = $this->drupalCreateNode([
'type' => $this->testType,
]);
$this->drupalGet('node/' . $node->id() . '/edit');
$this->assertSession()
->statusCodeEquals(200);
$this->assertText($this->testText);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.