function PermissionsPerBundleTest::applyRecipeFromString

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php \Drupal\KernelTests\Core\Recipe\PermissionsPerBundleTest::applyRecipeFromString()

Given a string of `recipe.yml` contents, applies it to the site.

Parameters

string $recipe_data: The contents of `recipe.yml`.

5 calls to PermissionsPerBundleTest::applyRecipeFromString()
PermissionsPerBundleTest::testActionIsOnlyAvailableToUserRoles in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests that the permissions-per-bundle action can only be applied to roles.
PermissionsPerBundleTest::testGrantPermissionsOnOneBundleThenAll in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests granting permissions for one bundle, then all of them.
PermissionsPerBundleTest::testGrantPermissionsPerBundle in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests granting multiple bundle-specific permissions.
PermissionsPerBundleTest::testGrantPermissionsToAllBundlesExceptSome in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests granting permissions for all bundles except certain ones.
PermissionsPerBundleTest::testInvalidValue in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests that there is an exception if the permission templates are invalid.

File

core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php, line 226

Class

PermissionsPerBundleTest
@covers <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21Action%21Plugin%21ConfigAction%21PermissionsPerBundle.php/class/PermissionsPerBundle/11.x" title="@internal This API is experimental." class="local">\Drupal\Core\Config\Action\Plugin\ConfigAction\PermissionsPerBundle</a> @covers <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21Action%21Plugin%21ConfigAction%21Deriver%21PermissionsPerBundleDeriver.php/class/PermissionsPerBundleDeriver/11.x" title="@internal This API is experimental." class="local">\Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver\PermissionsPerBundleDeriver</a>

Namespace

Drupal\KernelTests\Core\Recipe

Code

private function applyRecipeFromString(string $recipe_data) : void {
    $recipe = $this->createRecipe($recipe_data);
    RecipeRunner::processRecipe($recipe);
}

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