function ExternalCommandRequirementsTrait::externalCommandIsAvailable

Same name in other branches
  1. 9 core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait::externalCommandIsAvailable()
  2. 8.9.x core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait::externalCommandIsAvailable()

Determine if an external command is available.

Parameters

$command: The external command.

Return value

bool TRUE if external command is available, else FALSE.

1 call to ExternalCommandRequirementsTrait::externalCommandIsAvailable()
ExternalCommandRequirementsTrait::checkExternalCommandRequirements in core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php
Checks missing external command requirements.
3 methods override ExternalCommandRequirementsTrait::externalCommandIsAvailable()
ClassRequiresAvailable::externalCommandIsAvailable in core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php
Determine if an external command is available.
MethodRequires::externalCommandIsAvailable in core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php
Determine if an external command is available.
UsesCommandRequirements::externalCommandIsAvailable in core/tests/Drupal/BuildTests/Framework/Tests/ExternalCommandRequirementTest.php
Determine if an external command is available.

File

core/tests/Drupal/BuildTests/Framework/ExternalCommandRequirementsTrait.php, line 112

Class

ExternalCommandRequirementsTrait
Allows test classes to require external command line applications.

Namespace

Drupal\BuildTests\Framework

Code

private static function externalCommandIsAvailable($command) {
    $finder = new ExecutableFinder();
    return (bool) $finder->find($command);
}

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