You are here

public function LocaleConfigSubscriberForeignTest::register in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberForeignTest::register()

Registers test-specific services.

Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.

Parameters

\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.

Overrides KernelTestBase::register

See also

\Drupal\Tests\KernelTestBase::bootKernel()

File

core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php, line 19

Class

LocaleConfigSubscriberForeignTest
Tests default configuration handling with a foreign default language.

Namespace

Drupal\Tests\locale\Kernel

Code

public function register(ContainerBuilder $container) {
  parent::register($container);
  $language = Language::$defaultValues;
  $language['id'] = 'hu';
  $language['name'] = 'Hungarian';
  $container
    ->setParameter('language.default_values', $language);
}