function ExternalCommandRequirementTest::testMethodRequiresAvailable
@covers ::checkMethodCommandRequirements
      
    
File
- 
              core/tests/ Drupal/ BuildTests/ Framework/ Tests/ ExternalCommandRequirementTest.php, line 102 
Class
- ExternalCommandRequirementTest
- @coversDefaultClass \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait[[api-linebreak]] @group Build @group legacy
Namespace
Drupal\BuildTests\Framework\TestsCode
public function testMethodRequiresAvailable() : void {
  $this->expectDeprecation('Drupal\\BuildTests\\Framework\\ExternalCommandRequirementsTrait::checkMethodCommandRequirements() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\\TestTools\\Extension\\RequiresComposerTrait instead. See https://www.drupal.org/node/3362239');
  $requires = new MethodRequires();
  $ref_check = new \ReflectionMethod($requires, 'checkMethodCommandRequirements');
  // Use a try/catch block because otherwise PHPUnit might think this test is
  // legitimately skipped.
  try {
    $this->assertNull($ref_check->invoke($requires, 'testRequiresAvailable'));
  } catch (SkippedTestError $exception) {
    $this->fail(sprintf('The external command should be available: %s', $exception->getMessage()));
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
