You are here

public function DefaultConfigTest::containerBuild in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config/src/Tests/DefaultConfigTest.php \Drupal\config\Tests\DefaultConfigTest::containerBuild()

Sets up the base service container for this test.

Extend this method in your test to register additional service overrides that need to persist a DrupalKernel reboot. This method is called whenever the kernel is rebuilt.

Overrides KernelTestBase::containerBuild

See also

\Drupal\simpletest\KernelTestBase::setUp()

\Drupal\simpletest\KernelTestBase::enableModules()

\Drupal\simpletest\KernelTestBase::disableModules()

File

core/modules/config/src/Tests/DefaultConfigTest.php, line 53
Contains \Drupal\config\Tests\DefaultConfigTest.

Class

DefaultConfigTest
Tests that default configuration provided by all modules matches schema.

Namespace

Drupal\config\Tests

Code

public function containerBuild(ContainerBuilder $container) {
  parent::containerBuild($container);
  $container
    ->register('default_config_test.schema_storage')
    ->setClass('\\Drupal\\config_test\\TestInstallStorage')
    ->addArgument(InstallStorage::CONFIG_SCHEMA_DIRECTORY);
  $definition = $container
    ->getDefinition('config.typed');
  $definition
    ->replaceArgument(1, new Reference('default_config_test.schema_storage'));
}