class MethodRequires

Same name in other branches
  1. 8.9.x core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php \Drupal\BuildTests\Framework\Tests\MethodRequires
  2. 10 core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php \Drupal\BuildTests\Framework\Tests\MethodRequires

Hierarchy

Expanded class hierarchy of MethodRequires

File

core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php, line 160

Namespace

Drupal\BuildTests\Framework\Tests
View 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

Title Sort descending Modifiers Object type Summary Overriden Title
ExternalCommandRequirementsTrait::$existingCommands private static property A list of existing external commands we've already discovered.
ExternalCommandRequirementsTrait::checkClassCommandRequirements private static function Checks whether required external commands are available per test class.
ExternalCommandRequirementsTrait::checkExternalCommandRequirements private static function Checks missing external command requirements.
ExternalCommandRequirementsTrait::checkMethodCommandRequirements private static function Checks whether required external commands are available per method.
MethodRequires::externalCommandIsAvailable protected static function Determine if an external command is available. Overrides ExternalCommandRequirementsTrait::externalCommandIsAvailable
MethodRequires::testRequiresAvailable public function @requires externalCommand available_command
MethodRequires::testRequiresUnavailable public function @requires externalCommand unavailable_command

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.