You are here

protected function ConfigOtherModuleTest::getStorage in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php \Drupal\Tests\config\Functional\ConfigOtherModuleTest::getStorage()
  2. 10 core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php \Drupal\Tests\config\Functional\ConfigOtherModuleTest::getStorage()

Gets the provided entity type's storage.

Parameters

string $entity_type_id: (optional) The entity type ID to get a storage for. Defaults to 'config_test'.

Return value

\Drupal\Core\Entity\EntityStorageInterface The entity type's storage.

File

core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php, line 150

Class

ConfigOtherModuleTest
Tests default configuration provided by a module that does not own it.

Namespace

Drupal\Tests\config\Functional

Code

protected function getStorage($entity_type_id = 'config_test') {
  return \Drupal::entityTypeManager()
    ->getStorage($entity_type_id);
}