public function JsExampleTest::testJsExample in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/js_example/tests/src/Functional/JsExampleTest.php \Drupal\Tests\js_example\Functional\JsExampleTest::testJsExample()
Test all the paths defined by our module.
File
- js_example/
tests/ src/ Functional/ JsExampleTest.php, line 32
Class
- JsExampleTest
- Functional tests for the js_example module.
Namespace
Drupal\Tests\js_example\FunctionalCode
public function testJsExample() {
$assert = $this
->assertSession();
$paths = [
'examples/js-example',
'examples/js-example/weights',
'examples/js-example/accordion',
];
foreach ($paths as $path) {
$this
->drupalGet($path);
$assert
->statusCodeEquals(200);
}
}