本文整理汇总了PHP中Drupal\simpletest\KernelTestBase::containerBuild方法的典型用法代码示例。如果您正苦于以下问题:PHP KernelTestBase::containerBuild方法的具体用法?PHP KernelTestBase::containerBuild怎么用?PHP KernelTestBase::containerBuild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\simpletest\KernelTestBase
的用法示例。
在下文中一共展示了KernelTestBase::containerBuild方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: containerBuild
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
// Some test methods involve ModuleHandler operations, which attempt to
// rebuild and dump routes.
$container->register('router.dumper', 'Drupal\\Core\\Routing\\NullMatcherDumper');
}
示例2: containerBuild
/**
* {@inheritdoc}
*/
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'));
}
示例3: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
// \Drupal\simpletest\KernelTestBase::containerBuild() removes the alias path
// processor.
if ($container->hasDefinition('path_processor_alias')) {
$definition = $container->getDefinition('path_processor_alias');
$definition->addTag('path_processor_inbound', ['priority' => 100])->addTag('path_processor_outbound', ['priority' => 300]);
}
}
示例4: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
// TODO: Change the autogenerated stub
// Readd the incoming path alias for these tests.
if ($container->hasDefinition('path_processor_alias')) {
$definition = $container->getDefinition('path_processor_alias');
$definition->addTag('path_processor_inbound');
}
}
示例5: containerBuild
/**
* {@inheritdoc}
*
* Register a database cache backend rather than memory-based.
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
$container->register('cache_factory', 'Drupal\\Core\\Cache\\DatabaseBackendFactory')->addArgument(new Reference('database'))->addArgument(new Reference('cache_tags.invalidator.checksum'));
}
示例6: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
// Put a fake route bumper on the container to be called during uninstall.
$container->register('router.dumper', 'Drupal\\Core\\Routing\\NullMatcherDumper');
}
示例7: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
$container->set('url_generator', new SupernovaGenerator());
}
示例8: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
$definition = $container->getDefinition('path_processor_alias');
$definition->addTag('path_processor_inbound', ['priority' => 100]);
}
示例9: containerBuild
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container)
{
parent::containerBuild($container);
// Change container to database cache backends.
$container->register('cache_factory', 'Drupal\\Core\\Cache\\CacheFactory')->addArgument(new Reference('settings'))->addMethodCall('setContainer', array(new Reference('service_container')));
}