trait RequiresComposerTrait

Same name in other branches
  1. 11.x 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 12

Namespace

Drupal\TestTools\Extension
View source
trait RequiresComposerTrait {
    
    /**
     * @beforeClass
     */
    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.