function RecipeRunnerTest::testIsApplying

Tests the isApplying flag while a recipe is applied.

File

core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php, line 360

Class

RecipeRunnerTest
Tests Drupal\Core\Recipe\RecipeRunner.

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function testIsApplying() : void {
  $this->assertFalse(RecipeRunner::isApplying());
  $this->assertNull($this->isApplyingDuringModulesInstalled);
  $recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/install_two_modules');
  RecipeRunner::processRecipe($recipe);
  $this->assertTrue($this->isApplyingDuringModulesInstalled, 'RecipeRunner::isApplying() returned TRUE during hook_modules_installed()');
  $this->assertFalse(RecipeRunner::isApplying());
}

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