class MethodRequires in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php \Drupal\BuildTests\Framework\Tests\MethodRequires
- 9 core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php \Drupal\BuildTests\Framework\Tests\MethodRequires
Hierarchy
- class \Drupal\BuildTests\Framework\Tests\MethodRequires uses ExternalCommandRequirementsTrait
Expanded class hierarchy of MethodRequires
File
- core/
tests/ Drupal/ BuildTests/ Framework/ Tests/ ExternalCommandRequirementTest.php, line 160
Namespace
Drupal\BuildTests\Framework\TestsView source
class MethodRequires {
use ExternalCommandRequirementsTrait;
/**
* @requires externalCommand available_command
*/
public function testRequiresAvailable() {
}
/**
* @requires externalCommand unavailable_command
*/
public function testRequiresUnavailable() {
}
protected static function externalCommandIsAvailable($command) {
return in_array($command, [
'available_command',
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExternalCommandRequirementsTrait:: |
private static | property | A list of existing external commands we've already discovered. | |
ExternalCommandRequirementsTrait:: |
private static | function | Checks whether required external commands are available per test class. | |
ExternalCommandRequirementsTrait:: |
private static | function | Checks missing external command requirements. | |
ExternalCommandRequirementsTrait:: |
private static | function | Checks whether required external commands are available per method. | |
MethodRequires:: |
protected static | function |
Determine if an external command is available. Overrides ExternalCommandRequirementsTrait:: |
|
MethodRequires:: |
public | function | @requires externalCommand available_command | |
MethodRequires:: |
public | function | @requires externalCommand unavailable_command |