function RecipeCommandTest::assertCheckpointsExist
Same name in other branches
- 11.x core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php \Drupal\FunctionalTests\Core\Recipe\RecipeCommandTest::assertCheckpointsExist()
Asserts that the current set of checkpoints matches the given labels.
Parameters
string[] $expected_labels: The labels of every checkpoint that is expected to exist currently, in the expected order.
1 call to RecipeCommandTest::assertCheckpointsExist()
- RecipeCommandTest::testRecipeCommand in core/
tests/ Drupal/ FunctionalTests/ Core/ Recipe/ RecipeCommandTest.php
File
-
core/
tests/ Drupal/ FunctionalTests/ Core/ Recipe/ RecipeCommandTest.php, line 113
Class
- RecipeCommandTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeCommand @group Recipe
Namespace
Drupal\FunctionalTests\Core\RecipeCode
private function assertCheckpointsExist(array $expected_labels) : void {
$checkpoints = \Drupal::service('config.checkpoints');
$labels = array_map(fn(Checkpoint $c) => $c->label, iterator_to_array($checkpoints));
$this->assertSame($expected_labels, array_values($labels));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.