* An array of tests keyed by the the group name.
* @code
* $groups['block'] => array(
- * 'Drupal\block\Tests\BlockTest' => array(
- * 'name' => 'Drupal\block\Tests\BlockTest',
+ * 'Drupal\Tests\block\Functional\BlockTest' => array(
+ * 'name' => 'Drupal\Tests\block\Functional\BlockTest',
* 'description' => 'Tests block UI CRUD functionality.',
* 'group' => 'block',
* ),
// abstract class, trait or test fixture.
continue;
}
- // Skip this test class if it requires unavailable modules.
- // @todo PHPUnit skips tests with unmet requirements when executing a test
- // (instead of excluding them upfront). Refactor test runner to follow
- // that approach.
+ // Skip this test class if it is a Simpletest-based test and requires
+ // unavailable modules. TestDiscovery should not filter out module
+ // requirements for PHPUnit-based test classes.
+ // @todo Move this behavior to \Drupal\simpletest\TestBase so tests can be
+ // marked as skipped, instead.
// @see https://www.drupal.org/node/1273478
- if (!empty($info['requires']['module'])) {
- if (array_diff($info['requires']['module'], $this->availableExtensions['module'])) {
- continue;
+ if ($info['type'] == 'Simpletest') {
+ if (!empty($info['requires']['module'])) {
+ if (array_diff($info['requires']['module'], $this->availableExtensions['module'])) {
+ continue;
+ }
}
}
/**
* Retrieves information about a test class for UI purposes.
*
- * @param string $class
+ * @param string $classname
* The test classname.
* @param string $doc_comment
* (optional) The class PHPDoc comment. If not passed in reflection will be