function ContentLanguageSettingsUnitTest::setUpMockConfigEntityStorage

Reinitializes the config entity storage as a mock object.

1 call to ContentLanguageSettingsUnitTest::setUpMockConfigEntityStorage()
ContentLanguageSettingsUnitTest::testLoadByEntityTypeBundle in core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
Tests load by entity type bundle.

File

core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php, line 91

Class

ContentLanguageSettingsUnitTest
Tests Drupal\language\Entity\ContentLanguageSettings.

Namespace

Drupal\Tests\language\Unit

Code

protected function setUpMockConfigEntityStorage() : void {
  $this->configEntityStorageInterface = $this->createMock(EntityStorageInterface::class);
  \Drupal::getContainer()->set('config.storage', $this->configEntityStorageInterface);
}

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