function simpletest_test_get_all in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/simpletest/simpletest.module \simpletest_test_get_all()
Gets a list of all of the tests provided by the system.
The list of test classes is loaded by searching the designated directory for each module for files matching the PSR-0 standard. Once loaded the test list is cached and stored in a static variable.
Parameters
string $module: Name of a module. If set then only tests belonging to this module are returned.
Return value
array[] An array of tests keyed with the groups, and then keyed by test classes. For example:
$groups['Block'] => array(
'BlockTestCase' => array(
'name' => 'Block functionality',
'description' => 'Add, edit and delete custom block.',
'group' => 'Block',
),
);
1 call to simpletest_test_get_all()
- SimpletestTestForm::buildForm in core/
modules/ simpletest/ src/ Form/ SimpletestTestForm.php - Form constructor.
File
- core/
modules/ simpletest/ simpletest.module, line 509 - Provides testing functionality.
Code
function simpletest_test_get_all($module = NULL) {
return \Drupal::service('test_discovery')
->getTestClasses($module);
}