public function TestingExampleMenuTest::testTestingNavigation in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/testing_example/tests/src/Functional/TestingExampleMenuTest.php \Drupal\Tests\testing_example\Functional\TestingExampleMenuTest::testTestingNavigation()
Verify and validate that default menu links were loaded for this module.
File
- testing_example/
tests/ src/ Functional/ TestingExampleMenuTest.php, line 45
Class
- TestingExampleMenuTest
- Test the user-facing menus in Testing Example.
Namespace
Drupal\Tests\testing_example\FunctionalCode
public function testTestingNavigation() {
foreach ([
'' => '/examples/testing-example',
] as $page => $path) {
$this
->drupalGet($page);
$this
->assertLinkByHref($path);
}
$this
->drupalGet('/examples/testing-example');
$this
->assertResponse(200);
}