function HelpPageOrderTest::testHelp
Same name in other branches
- 9 core/modules/help/tests/src/Functional/HelpPageOrderTest.php \Drupal\Tests\help\Functional\HelpPageOrderTest::testHelp()
- 8.9.x core/modules/help/tests/src/Functional/HelpPageOrderTest.php \Drupal\Tests\help\Functional\HelpPageOrderTest::testHelp()
- 11.x core/modules/help/tests/src/Functional/HelpPageOrderTest.php \Drupal\Tests\help\Functional\HelpPageOrderTest::testHelp()
Tests the order of the help page.
File
-
core/
modules/ help/ tests/ src/ Functional/ HelpPageOrderTest.php, line 54
Class
- HelpPageOrderTest
- Verify the order of the help page.
Namespace
Drupal\Tests\help\FunctionalCode
public function testHelp() : void {
$pos = 0;
$this->drupalGet('admin/help');
$page_text = $this->getTextContent();
foreach ($this->stringOrder as $item) {
$new_pos = strpos($page_text, $item, $pos);
$this->assertGreaterThan($pos, $new_pos, "Order of {$item} is not correct on help page");
$pos = $new_pos;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.