本文整理匯總了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);
}