trait RequiresComposerTrait

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/TestTools/Extension/RequiresComposerTrait.php \Drupal\TestTools\Extension\RequiresComposerTrait
  2. 10 core/tests/Drupal/TestTools/Extension/RequiresComposerTrait.php \Drupal\TestTools\Extension\RequiresComposerTrait

Ensures Composer executable is available, skips test otherwise.

Hierarchy

1 file declares its use of RequiresComposerTrait
BuildTestBase.php in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php

File

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

Namespace

Drupal\TestTools\Extension
View source
trait RequiresComposerTrait {
  public static function requiresComposer() : void {
    if (!(new ExecutableFinder())->find('composer')) {
      static::markTestSkipped('This test requires the Composer executable to be accessible.');
    }
  }

}

Members

Title Sort descending Modifiers Object type Summary
RequiresComposerTrait::requiresComposer public static function #[BeforeClass]

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