function RecipeCommandTest::testExceptionOnRollback

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

Tests that errors during config rollback won't steamroll validation errors.

File

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

Class

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

Namespace

Drupal\FunctionalTests\Core\Recipe

Code

public function testExceptionOnRollback() : void {
    $process = $this->applyRecipe('core/tests/fixtures/recipes/config_rollback_exception', 1);
    // The error from the config importer should be visible.
    $output = $process->getOutput();
    $this->assertStringContainsString('There were errors validating the config synchronization.', $output);
    $this->assertStringContainsString('Provides a filter plugin that is in use', $output);
    // And the exception that actually *caused* the error should be visible too.
    $this->assertStringContainsString('There were validation errors in system.image:', $process->getErrorOutput());
}

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