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