function RecipeCommandTest::assertCheckpointsExist

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

Class

RecipeCommandTest
Tests recipe command.

Namespace

Drupal\FunctionalTests\Core\Recipe

Code

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.