function simpletest_test_get_all
Same name in other branches
- 7.x 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-4 standard. Once loaded the test list is cached and stored in a static variable.
Parameters
string $extension: (optional) The name of an extension to limit discovery to; e.g., 'node'.
string[] $types: An array of included test types.
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',
),
);
Deprecated
in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::service('test_discovery')->getTestClasses($extension, $types) instead.
1 call to simpletest_test_get_all()
- SimpletestDeprecationTest::testDeprecatedFunctions in core/
modules/ simpletest/ tests/ src/ Kernel/ SimpletestDeprecationTest.php - @expectedDeprecation The simpletest_phpunit_configuration_filepath function is deprecated since version 8.4.x and will be removed in 9.0.0. @expectedDeprecation The simpletest_test_get_all function is deprecated in version 8.3.x and will be removed in…
File
-
core/
modules/ simpletest/ simpletest.module, line 533
Code
function simpletest_test_get_all($extension = NULL, array $types = []) {
@trigger_error('The ' . __FUNCTION__ . ' function is deprecated in version 8.3.x and will be removed in 9.0.0. Use \\Drupal::service(\'test_discovery\')->getTestClasses($extension, $types) instead.', E_USER_DEPRECATED);
return \Drupal::service('test_discovery')->getTestClasses($extension, $types);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.