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


PHP KernelTestBase::register方法代码示例

本文整理汇总了PHP中Drupal\KernelTests\KernelTestBase::register方法的典型用法代码示例。如果您正苦于以下问题:PHP KernelTestBase::register方法的具体用法?PHP KernelTestBase::register怎么用?PHP KernelTestBase::register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\KernelTests\KernelTestBase的用法示例。


在下文中一共展示了KernelTestBase::register方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     $parameters = $container->getParameter('twig.config');
     $parameters['debug'] = TRUE;
     $container->setParameter('twig.config', $parameters);
 }
开发者ID:penguinclub,项目名称:penguinweb_drupal8,代码行数:10,代码来源:DevelTwigExtensionTest.php

示例2: register

 /**
  * {@inheritdoc}
  */
 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'));
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:10,代码来源:DefaultConfigTest.php

示例3: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     // Some test methods involve ModuleHandler operations, which attempt to
     // rebuild and dump routes.
     $container->register('router.dumper', 'Drupal\\Core\\Routing\\NullMatcherDumper');
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:10,代码来源:ThemeInstallerTest.php

示例4: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     // Change container to database cache backends.
     $container->register('cache_factory', 'Drupal\\Core\\Cache\\CacheFactory')->addArgument(new Reference('settings'))->addMethodCall('setContainer', [new Reference('service_container')]);
     // Change container to use database lock backends.
     $container->register('lock', 'Drupal\\Core\\Lock\\DatabaseLockBackend')->addArgument(new Reference('database'));
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:11,代码来源:CacheCollectorTest.php

示例5: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     $container->register('stream_wrapper.private', 'Drupal\\Core\\StreamWrapper\\PrivateStream')->addTag('stream_wrapper', ['scheme' => 'private']);
     if (isset($this->scheme)) {
         $container->register('stream_wrapper.' . $this->scheme, $this->classname)->addTag('stream_wrapper', ['scheme' => $this->scheme]);
     }
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:11,代码来源:FileTestBase.php

示例6: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     foreach ($this->providerTestCustomStreamWrappers() as $stream_wrapper) {
         $scheme = $stream_wrapper[0];
         $class = $stream_wrapper[2];
         $container->register("stream_wrapper.{$scheme}", $class)->addTag('stream_wrapper', ['scheme' => $scheme]);
     }
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:12,代码来源:ImageStyleCustomStreamWrappersTest.php

示例7: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     // \Drupal\KernelTests\KernelTestBase::register() 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:eigentor,项目名称:tommiblog,代码行数:13,代码来源:ContentNegotiationRoutingTest.php

示例8: register

 /**
  * {@inheritdoc}
  *
  * Register a database cache backend rather than memory-based.
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     $container->register('cache_factory', 'Drupal\\Core\\Cache\\DatabaseBackendFactory')->addArgument(new Reference('database'))->addArgument(new Reference('cache_tags.invalidator.checksum'));
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:10,代码来源:DbDumpTest.php

示例9: register

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

示例10: register

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

示例11: register

 /**
  * {@inheritdoc}
  */
 public function register(ContainerBuilder $container)
 {
     parent::register($container);
     // 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:eigentor,项目名称:tommiblog,代码行数:12,代码来源:RouteProviderTest.php


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