You are here

protected function RabbitHoleBehaviorSettingsFormTestBase::loadBundle in Rabbit Hole 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/RabbitHoleBehaviorSettingsFormTestBase.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorSettingsFormTestBase::loadBundle()

Loads test bundle object.

Parameters

mixed $id: Bundle ID.

Return value

\Drupal\Core\Config\Entity\ConfigEntityBundleBase Loaded bundle.

5 calls to RabbitHoleBehaviorSettingsFormTestBase::loadBundle()
GroupBehaviorSettingsFormTest::createEntityBundleFormSubmit in modules/rh_group/tests/src/Functional/GroupBehaviorSettingsFormTest.php
Creates new entity bundle via form submit.
MediaBehaviorSettingsFormTest::createEntityBundleFormSubmit in modules/rh_media/tests/src/Functional/MediaBehaviorSettingsFormTest.php
Creates new entity bundle via form submit.
NodeBehaviorSettingsFormTest::createEntityBundleFormSubmit in modules/rh_node/tests/src/Functional/NodeBehaviorSettingsFormTest.php
Creates new entity bundle via form submit.
ProductBehaviorSettingsFormTest::createEntityBundleFormSubmit in modules/rh_commerce/tests/src/Functional/ProductBehaviorSettingsFormTest.php
Creates new entity bundle via form submit.
TaxonomyBehaviorSettingsFormTest::createEntityBundleFormSubmit in modules/rh_taxonomy/tests/src/Functional/TaxonomyBehaviorSettingsFormTest.php
Creates new entity bundle via form submit.

File

tests/src/Functional/RabbitHoleBehaviorSettingsFormTestBase.php, line 349

Class

RabbitHoleBehaviorSettingsFormTestBase
Base class for the Rabbit Hole form additions tests.

Namespace

Drupal\Tests\rabbit_hole\Functional

Code

protected function loadBundle($id) {
  $storage = \Drupal::entityTypeManager()
    ->getStorage($this->bundleEntityTypeName);
  $storage
    ->resetCache([
    $id,
  ]);
  $bundle = $storage
    ->load($id);
  $this
    ->assertInstanceOf(ConfigEntityBundleBase::class, $bundle);
  return $bundle;
}