You are here

private function ConfigEntityDependencyCollectorTest::getTestLanguages in Dependency Calculation 8

Returns set of the test languages.

Return value

array Languages list.

Throws

\Drupal\Core\Entity\EntityStorageException

1 call to ConfigEntityDependencyCollectorTest::getTestLanguages()
ConfigEntityDependencyCollectorTest::testLanguageConfigEntitiesDependencyCalculation in tests/src/Kernel/EventSubscriber/DependencyCollector/ConfigEntityDependencyCollectorTest.php
Tests language config dependencies calculation.

File

tests/src/Kernel/EventSubscriber/DependencyCollector/ConfigEntityDependencyCollectorTest.php, line 236

Class

ConfigEntityDependencyCollectorTest
Class ConfigEntityDependencyCollector.

Namespace

Drupal\Tests\depcalc\Kernel\EventSubscriber\DependencyCollector

Code

private function getTestLanguages() : array {
  foreach ([
    'cs',
    'fr',
  ] as $language) {
    ConfigurableLanguage::create([
      'id' => $language,
      'label' => $this
        ->randomString(),
    ])
      ->save();
  }
  return [
    ConfigurableLanguage::load('cs'),
    ConfigurableLanguage::load('fr'),
  ];
}