class LocaleDefaultConfigStorageTest

Same name and namespace in other branches
  1. 11.x core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php \Drupal\Tests\locale\Kernel\LocaleDefaultConfigStorageTest

@group locale

Hierarchy

Expanded class hierarchy of LocaleDefaultConfigStorageTest

File

core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php, line 14

Namespace

Drupal\Tests\locale\Kernel
View source
class LocaleDefaultConfigStorageTest extends KernelTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'language',
    'locale',
    'locale_test',
    'locale_test_translate',
  ];
  public function testGetComponentNames() : void {
    $storage = new LocaleDefaultConfigStorage(new NullStorage(), \Drupal::languageManager(), 'testing');
    $expected = [
      'locale_test.no_translation',
      'locale_test.translation',
      'locale_test.translation_multiple',
      'locale_test_translate.settings',
      'block.block.test_default_config',
    ];
    $actual = $storage->getComponentNames('module', [
      \Drupal::moduleHandler()->getModule('locale_test'),
      \Drupal::moduleHandler()->getModule('locale_test_translate'),
    ]);
    $this->assertSame($expected, $actual);
  }

}

Members

Title Sort descending Modifiers Object type Summary
ExtensionListTestTrait::getModulePath protected function Gets the path for the specified module.
ExtensionListTestTrait::getThemePath protected function Gets the path for the specified theme.
LocaleDefaultConfigStorageTest::$modules protected static property Modules to install.
LocaleDefaultConfigStorageTest::testGetComponentNames public function
StorageCopyTrait::replaceStorageContents protected static function Copy the configuration from one storage to another and remove stale items.

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