// Add discovery for traits which are shared between different test
// suites.
$this->testNamespaces
["Drupal\\Tests\\
$name\\Traits\\"
][] = "
$base_path/tests/src/Traits";
} foreach ($this->testNamespaces
as $prefix =>
$paths) { $this->classLoader->
addPsr4($prefix,
$paths);
} $loader =
require __DIR__ . '/../../../../../autoload.php';
// Ensure we have a valid TestCase class.
ClassWriter::
mutateTestBase($loader);
return $this->testNamespaces;
} /**
* Discovers all available tests in all extensions.
*
* @param string $extension
* (optional) The name of an extension to limit discovery to; e.g., 'node'.
* @param string[] $types
* An array of included test types.
*
* @return array
* An array of tests keyed by the group name. If a test is annotated to
* belong to multiple groups, it will appear under all group keys it belongs
* to.
*
* @code
* $groups['block'] => array(
* 'Drupal\Tests\block\Functional\BlockTest' => array(
* 'name' => 'Drupal\Tests\block\Functional\BlockTest',
* 'description' => 'Tests block UI CRUD functionality.',
* 'group' => 'block',
* 'groups' => ['block', 'group2', 'group3'],
* ),
* );
* @endcode
*
* @todo Remove singular grouping; retain list of groups in 'group' key.
* @see https://www.drupal.org/node/2296615
*/