function RequiresComposerTrait::requiresComposer

Same name in other branches
  1. 10 core/tests/Drupal/TestTools/Extension/RequiresComposerTrait.php \Drupal\TestTools\Extension\RequiresComposerTrait::requiresComposer()

File

core/tests/Drupal/TestTools/Extension/RequiresComposerTrait.php, line 15

Class

RequiresComposerTrait
Ensures Composer executable is available, skips test otherwise.

Namespace

Drupal\TestTools\Extension

Code

public static function requiresComposer() : void {
    if (!(new ExecutableFinder())->find('composer')) {
        static::markTestSkipped('This test requires the Composer executable to be accessible.');
    }
}

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