private static function ExternalCommandRequirementsTrait::checkMethodCommandRequirements in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait::checkMethodCommandRequirements()
- 9 core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait::checkMethodCommandRequirements()
Checks whether required external commands are available per method.
Throws
\PHPUnit\Framework\SkippedTestError Thrown when the requirements are not met, and this test should be skipped. Callers should not catch this exception.
File
- core/
tests/ Drupal/ BuildTests/ Framework/ ExternalCommandRequirementsTrait.php, line 44
Class
- ExternalCommandRequirementsTrait
- Allows test classes to require external command line applications.
Namespace
Drupal\BuildTests\FrameworkCode
private static function checkMethodCommandRequirements($name) {
$annotations = Test::parseTestMethodAnnotations(static::class, $name);
if (!empty($annotations['method']['requires'])) {
static::checkExternalCommandRequirements($annotations['method']['requires']);
}
}