Example: Testing in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/testing_example/testing_example.module \testing_example
This example demonstrates Drupal 8 testing frameworks.
This module creates a new node type called 'Testing Example Node Type,' so that we can test it.
This code was originally written to accompany the tutorial at http://drupal.org/node/890654. That's a Drupal 7 example, but can still teach you much.
Parent topics
File
- testing_example/
testing_example.module, line 12 - Module file for testing_example.
Functions
Name | Location | Description |
---|---|---|
testing_example_node_access |
testing_example/ |
Implements hook_node_access(). |
testing_example_test_node_view |
testing_example/ |
Implements hook_ENTITY_TYPE_view(). |
Classes
Name | Location | Description |
---|---|---|
ExampleFixtureManagementTest |
testing_example/ |
Demonstrate manipulating fixture data in a kernel test. |
SimpleTestExampleMockModuleTest |
testing_example/ |
Demonstrate SimpleTest with a mock module. |
SimpleTestExampleTest |
testing_example/ |
Ensure that the simpletest_example content type provided functions properly. |
SkeletonTest |
testing_example/ |
Skeleton functional test. |
TestingExampleMenuTest |
testing_example/ |
Test the user-facing menus in Testing Example. |