當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。