class ProfileWithRecipesTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/ProfileWithRecipesTest.php \Drupal\FunctionalTests\Installer\ProfileWithRecipesTest

Tests installing from a profile that also applies recipes.

Attributes

#[Group('Installer')] #[RunTestsInSeparateProcesses]

Hierarchy

Expanded class hierarchy of ProfileWithRecipesTest

File

core/tests/Drupal/FunctionalTests/Installer/ProfileWithRecipesTest.php, line 14

Namespace

Drupal\FunctionalTests\Installer
View source
class ProfileWithRecipesTest extends InstallerTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $profile = 'testing_with_recipes';
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Tests that the recipes listed by the profile were applied.
   */
  public function testRecipeWasApplied() : void {
    // The profile specified a module, which should have been installed.
    $this->assertTrue(\Drupal::moduleHandler()->moduleExists('workflows'));
    // It also applied a media type recipe.
    $this->assertInstanceOf(MediaType::class, MediaType::load('audio'));
  }

}

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