本文整理汇总了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);
}
示例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);
}
示例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);
}