public function ConfigImporterTest::setUp in Currency 8.3
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ ConfigImporterTest.php, line 77
Class
- ConfigImporterTest
- @coversDefaultClass \Drupal\currency\ConfigImporter
Namespace
Drupal\Tests\currency\UnitCode
public function setUp() : void {
$this->configStorage = $this
->createMock(StorageInterface::class);
$this->currencyStorage = $this
->createMock(EntityStorageInterface::class);
$this->currencyLocaleStorage = $this
->createMock(EntityStorageInterface::class);
$this->moduleHandler = $this
->createMock(ModuleHandlerInterface::class);
$this->typedConfigManager = $this
->createMock(TypedConfigManagerInterface::class);
$map = [
[
'currency',
$this->currencyStorage,
],
[
'currency_locale',
$this->currencyLocaleStorage,
],
];
$this->entityTypeManager = $this
->createMock(EntityTypeManagerInterface::class);
$this->entityTypeManager
->expects($this
->atLeastOnce())
->method('getStorage')
->willReturnMap($map);
$this->sut = new ConfigImporter($this->moduleHandler, $this->typedConfigManager, $this->entityTypeManager);
}