function TestCompatibilityTrait::getTestClassCovers
Same name in this branch
- 11.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit9/TestCompatibilityTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit9\TestCompatibilityTrait::getTestClassCovers()
Same name in other branches
- 10 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit9/TestCompatibilityTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit9\TestCompatibilityTrait::getTestClassCovers()
Gets @covers defined on the test class.
Return value
string[] An array of classes listed with the @covers annotation.
File
-
core/
tests/ Drupal/ TestTools/ PhpUnitCompatibility/ PhpUnit10/ TestCompatibilityTrait.php, line 20
Class
- TestCompatibilityTrait
- Drupal's forward compatibility layer with multiple versions of PHPUnit.
Namespace
Drupal\TestTools\PhpUnitCompatibility\PhpUnit10Code
public function getTestClassCovers() : array {
$ret = [];
foreach ($this->valueObjectForEvents()
->metadata()
->isCovers()
->isClassLevel() as $metadata) {
$ret[] = $metadata->target();
}
return $ret;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.