This example demonstrates how to implement simpletest tests.
This module creates a new "SimpleTest Example Node Type" content type we can test.
See also Testing Framework.
Parent topics
File
- modules/
examples/ simpletest_example/ simpletest_example.module, line 7 - Hook implementations for the SimpleTest Example module.
Functions
Name | Location | Description |
---|---|---|
simpletest_example_install |
modules/ |
Implements hook_install(). |
simpletest_example_permission |
modules/ |
Implements hook_permission(). |
simpletest_example_node_access |
modules/ |
Implements hook_node_access(). |
simpletest_example_form |
modules/ |
Implements hook_form(). |
simpletest_example_menu |
modules/ |
Implements hook_menu(). |
_simpletest_example_explanation |
modules/ |
Returns an explanation of this module. |
simpletest_example_empty_mysql_date |
modules/ |
A simple self-contained function used to demonstrate unit tests. |
simpletest_example_test_node_view |
modules/ |
Implements hook_node_view(). |
Classes
Name | Location | Description |
---|---|---|
SimpleTestExampleTestCase |
modules/ |
The SimpleTestExampleTestCase is a functional test case, meaning that it actually exercises a particular sequence of actions through the web UI. The majority of core test cases are done this way, but the SimpleTest suite also provides unit tests as… |
SimpleTestUnitTestExampleTestCase |
modules/ |
Although most core test cases are based on BackdropWebTestCase and are functional tests (exercising the web UI) we also have BackdropUnitTestCase, which executes much faster because a Backdrop install does not have to be one. No environment is… |
SimpleTestExampleMockModuleTestCase |
modules/ |
SimpleTestExampleMockModuleTestCase allows us to demonstrate how you can use a mock module to aid in functional testing in Backdrop. |