function NodeHelpTest::testNodeShowHelpText
Same name in other branches
- 9 core/modules/node/tests/src/Functional/NodeHelpTest.php \Drupal\Tests\node\Functional\NodeHelpTest::testNodeShowHelpText()
- 8.9.x 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()
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() : void {
// Check the node add form.
$this->drupalGet('node/add/' . $this->testType);
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextContains($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->assertSession()
->pageTextContains($this->testText);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.