public function LocaleResolverTest::setUp in Currency 8.3
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ LocaleResolverTest.php, line 71
Class
- LocaleResolverTest
- @coversDefaultClass \Drupal\currency\LocaleResolver
Namespace
Drupal\Tests\currency\UnitCode
public function setUp() : void {
$this->configFactory = $this
->createMock(ConfigFactoryInterface::class);
$this->currencyLocaleStorage = $this
->createMock(EntityStorageInterface::class);
$this->entityTypeManager = $this
->createMock(EntityTypeManagerInterface::class);
$this->entityTypeManager
->expects($this
->any())
->method('getStorage')
->with('currency_locale')
->willReturn($this->currencyLocaleStorage);
$this->eventDispatcher = $this
->createMock(EventDispatcherInterface::class);
$this->languageManager = $this
->createMock(LanguageManagerInterface::class);
$this->sut = new LocaleResolver($this->entityTypeManager, $this->languageManager, $this->configFactory, $this->eventDispatcher);
}