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


PHP EntityTypeManagerInterface::expects方法代码示例

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


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

示例1: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->currencyStorage = $this->getMock(EntityStorageInterface::class);
     $this->currencyLocaleStorage = $this->getMock(EntityStorageInterface::class);
     $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
     $map = [['currency', $this->currencyStorage], ['currency_locale', $this->currencyLocaleStorage]];
     $this->entityTypeManager->expects($this->atLeastOnce())->method('getStorage')->willReturnMap($map);
     $this->stringTranslation = $this->getStringTranslationStub();
     $this->sut = new FormHelper($this->stringTranslation, $this->entityTypeManager);
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:13,代码来源:FormHelperTest.php

示例2: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->configFactory = $this->getMock(ConfigFactoryInterface::class);
     $this->currencyLocaleStorage = $this->getMock(EntityStorageInterface::class);
     $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
     $this->entityTypeManager->expects($this->any())->method('getStorage')->with('currency_locale')->willReturn($this->currencyLocaleStorage);
     $this->eventDispatcher = $this->getMock(EventDispatcherInterface::class);
     $this->languageManager = $this->getMock(LanguageManagerInterface::class);
     $this->sut = new LocaleResolver($this->entityTypeManager, $this->languageManager, $this->configFactory, $this->eventDispatcher);
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:13,代码来源:LocaleResolverTest.php

示例3: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->configStorage = $this->getMock(StorageInterface::class);
     $this->currencyStorage = $this->getMock(EntityStorageInterface::class);
     $this->currencyLocaleStorage = $this->getMock(EntityStorageInterface::class);
     $this->eventDispatcher = $this->getMock(EventDispatcherInterface::class);
     $this->moduleHandler = $this->getMock(ModuleHandlerInterface::class);
     $this->typedConfigManager = $this->getMock(TypedConfigManagerInterface::class);
     $map = [['currency', $this->currencyStorage], ['currency_locale', $this->currencyLocaleStorage]];
     $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
     $this->entityTypeManager->expects($this->atLeastOnce())->method('getStorage')->willReturnMap($map);
     $this->sut = new ConfigImporter($this->moduleHandler, $this->eventDispatcher, $this->typedConfigManager, $this->entityTypeManager);
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:16,代码来源:ConfigImporterTest.php


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