function RecipeCommandTest::testErrorOnNonExistentDirectory

Same name in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php \Drupal\FunctionalTests\Core\Recipe\RecipeCommandTest::testErrorOnNonExistentDirectory()

Tests the recipe command with a non-existent directory.

File

core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php, line 97

Class

RecipeCommandTest
@coversDefaultClass \Drupal\Core\Recipe\RecipeCommand @group Recipe

Namespace

Drupal\FunctionalTests\Core\Recipe

Code

public function testErrorOnNonExistentDirectory() : void {
    $process = $this->applyRecipe('core/tests/fixtures/recipes/does_not_exist', 1);
    // The directory error should be the only error visible.
    $output = trim(preg_replace('/\\s+/', ' ', $process->getOutput()));
    $this->assertSame('[ERROR] The supplied path core/tests/fixtures/recipes/does_not_exist is not a directory', $output);
    $this->assertEmpty($process->getErrorOutput());
}

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