function RecipeCommandTest::testErrorOnNonExistentDirectory

Same name and namespace in other branches
  1. 10 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 99

Class

RecipeCommandTest
Tests recipe command.

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.