function DrupalStandardsListenerTrait::classExists
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Listeners/DrupalStandardsListenerTrait.php \Drupal\Tests\Listeners\DrupalStandardsListenerTrait::classExists()
Helper method to check if a string names a valid class or trait.
Parameters
string $class: Name of the class to check.
Return value
bool TRUE if the class exists, FALSE otherwise.
1 call to DrupalStandardsListenerTrait::classExists()
- DrupalStandardsListenerTrait::checkValidCoversForTest in core/
tests/ Drupal/ Tests/ Listeners/ DrupalStandardsListenerTrait.php - Check an individual test run for valid @covers annotation.
File
-
core/
tests/ Drupal/ Tests/ Listeners/ DrupalStandardsListenerTrait.php, line 46
Class
- DrupalStandardsListenerTrait
- Listens for PHPUnit tests and fails those with invalid coverage annotations.
Namespace
Drupal\Tests\ListenersCode
private function classExists($class) {
return class_exists($class, TRUE) || trait_exists($class, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.