Example: Simpletest
Same name in other branches
- 6.x-1.x simpletest_example/simpletest_example.module \simpletest_example
An example of simpletest tests to accompany the tutorial at http://drupal.org/node/890654.
This module creates a new node type called 'SimpleTest Example Node Type,' so that we can test it.
Parent topics
File
-
simpletest_example/
simpletest_example.module, line 8
Functions
Title Sort descending | File name | Summary |
---|---|---|
simpletest_example_empty_mysql_date | simpletest_example/ |
A simple self-contained function used to demonstrate unit tests. |
simpletest_example_form | simpletest_example/ |
Implements hook_form(). |
simpletest_example_install | simpletest_example/ |
Implements hook_install(). |
simpletest_example_menu | simpletest_example/ |
Implements hook_menu(). |
simpletest_example_node_access | simpletest_example/ |
Implements hook_node_access(). |
simpletest_example_node_info | simpletest_example/ |
Implements hook_node_info(). |
simpletest_example_permission | simpletest_example/ |
Implements hook_permission(). |
simpletest_example_test_node_view | simpletest_example/ |
Implements hook_node_view(). |
simpletest_example_update_7001 | simpletest_example/ |
Adds a body field to the simpletest_example node type. |
_simpletest_example_explanation | simpletest_example/ |
Returns an explanation of this module. |
Classes
Title Sort descending | File name | Summary |
---|---|---|
SimpleTestExampleMockModuleTestCase | simpletest_example/ |
SimpleTestExampleMockModuleTestCase allows us to demonstrate how you can use a mock module to aid in functional testing in Drupal. |
SimpleTestExampleTestCase | simpletest_example/ |
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 | simpletest_example/ |
Although most core test cases are based on DrupalWebTestCase and are functional tests (exercising the web UI) we also have DrupalUnitTestCase, which executes much faster because a Drupal install does not have to be one. No environment is provided to a… |