当前位置: 首页>>代码示例>>PHP>>正文


PHP KernelTestBase::containerBuild方法代码示例

本文整理汇总了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');
 }
开发者ID:dev981,项目名称:gaptest,代码行数:7,代码来源:ThemeHandlerTest.php

示例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'));
 }
开发者ID:sarahwillem,项目名称:OD8,代码行数:10,代码来源:DefaultConfigTest.php

示例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]);
     }
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:13,代码来源:ContentNegotiationRoutingTest.php

示例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');
     }
 }
开发者ID:nsp15,项目名称:Drupal8,代码行数:13,代码来源:RouteProviderTest.php

示例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'));
 }
开发者ID:nsp15,项目名称:Drupal8,代码行数:10,代码来源:DbDumpTest.php

示例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');
 }
开发者ID:anyforsoft,项目名称:csua_d8,代码行数:9,代码来源:ModuleHandlerTest.php

示例7: containerBuild

 /**
  * {@inheritdoc}
  */
 public function containerBuild(ContainerBuilder $container)
 {
     parent::containerBuild($container);
     $container->set('url_generator', new SupernovaGenerator());
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:8,代码来源:HelpEmptyPageTest.php

示例8: containerBuild

 /**
  * {@inheritdoc}
  */
 public function containerBuild(ContainerBuilder $container)
 {
     parent::containerBuild($container);
     $definition = $container->getDefinition('path_processor_alias');
     $definition->addTag('path_processor_inbound', ['priority' => 100]);
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:9,代码来源:PathAliasMenuLinkContentTest.php

示例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')));
 }
开发者ID:318io,项目名称:318-io,代码行数:9,代码来源:DatabaseBackendTagTest.php


注:本文中的Drupal\simpletest\KernelTestBase::containerBuild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。