function DefaultConfigTest::register

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php \Drupal\KernelTests\Core\Config\DefaultConfigTest::register()

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php, line 52

Class

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

Namespace

Drupal\KernelTests\Core\Config

Code

public function register(ContainerBuilder $container) {
    parent::register($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'));
}

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