function JsExampleTest::testJsExample

Same name in other branches
  1. 4.0.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

modules/js_example/tests/src/Functional/JsExampleTest.php, line 32

Class

JsExampleTest
Functional tests for the js_example module.

Namespace

Drupal\Tests\js_example\Functional

Code

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);
    }
}