class JsExampleTest
Same name in other branches
- 3.x modules/js_example/tests/src/Functional/JsExampleTest.php \Drupal\Tests\js_example\Functional\JsExampleTest
- 4.0.x modules/js_example/tests/src/Functional/JsExampleTest.php \Drupal\Tests\js_example\Functional\JsExampleTest
Functional tests for the js_example module.
@group js_example @group examples
Hierarchy
- class \Drupal\Tests\examples\Functional\ExamplesBrowserTestBase extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\js_example\Functional\JsExampleTest extends \Drupal\Tests\examples\Functional\ExamplesBrowserTestBase
Expanded class hierarchy of JsExampleTest
Related topics
File
-
js_example/
tests/ src/ Functional/ JsExampleTest.php, line 15
Namespace
Drupal\Tests\js_example\FunctionalView source
class JsExampleTest extends ExamplesBrowserTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Modules to install.
*
* @var array
*/
public static $modules = [
'js_example',
'node',
];
/**
* Test all the paths defined by our module.
*/
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);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ExamplesBrowserTestBase::setUp | protected | function | 4 | ||
ExamplesBrowserTestBase::setupExamplesMenus | protected | function | Set up menus and tasks in their regions. | ||
JsExampleTest::$defaultTheme | protected | property | |||
JsExampleTest::$modules | public static | property | Modules to install. | Overrides ExamplesBrowserTestBase::$modules | |
JsExampleTest::testJsExample | public | function | Test all the paths defined by our module. |