You are here

protected function ConfigWithTranslationTest::getSyncStorage in Config Ignore 8.3

Returns the config sync storage.

Parameters

string|null $langcode: (optional) The language collection language code or NULL for the default collection.

Return value

\Drupal\Core\Config\StorageInterface The config sync storage.

3 calls to ConfigWithTranslationTest::getSyncStorage()
ConfigWithTranslationTest::assertExportedValue in tests/src/Functional/ConfigWithTranslationTest.php
Asserts that a given value for a given config exists in sync.
ConfigWithTranslationTest::setConfigSyncValue in tests/src/Functional/ConfigWithTranslationTest.php
Sets a config value in the sync store.
ConfigWithTranslationTest::testConfigExport in tests/src/Functional/ConfigWithTranslationTest.php
Tests config export.

File

tests/src/Functional/ConfigWithTranslationTest.php, line 297

Class

ConfigWithTranslationTest
Tests config_ignore with translated configurations.

Namespace

Drupal\Tests\config_ignore\Functional

Code

protected function getSyncStorage($langcode = NULL) {
  $sync_storage = \Drupal::service('config.storage.sync');
  if ($langcode) {
    $sync_storage = $sync_storage
      ->createCollection("language.{$langcode}");
  }
  return $sync_storage;
}