function RecipeRunnerTest::testIsApplying
Tests the isApplying flag while a recipe is applied.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 360
Class
Namespace
Drupal\KernelTests\Core\RecipeCode
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.