function GenericRecipeTestBase::getRecipePath

Returns the path of the recipe under test.

Return value

string The absolute path of the recipe that contains this test.

1 call to GenericRecipeTestBase::getRecipePath()
GenericRecipeTestBase::doApply in core/modules/system/tests/src/Functional/Recipe/GenericRecipeTestBase.php
Applies the recipe under test.

File

core/modules/system/tests/src/Functional/Recipe/GenericRecipeTestBase.php, line 33

Class

GenericRecipeTestBase
Runs a series of generic tests for one recipe.

Namespace

Drupal\Tests\system\Functional\Recipe

Code

protected function getRecipePath() : string {
    // Assume this test in located in RECIPE_DIR/tests/src/Functional.
    return dirname((new \ReflectionObject($this))->getFileName(), 4);
}

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