function LocaleProjectRepositoryTest::setUp

Same name and namespace in other branches
  1. main core/modules/locale/tests/src/Unit/LocaleProjectRepositoryTest.php \Drupal\Tests\locale\Unit\LocaleProjectRepositoryTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/locale/tests/src/Unit/LocaleProjectRepositoryTest.php, line 80

Class

LocaleProjectRepositoryTest
Tests Drupal\locale\LocaleProjectRepository.

Namespace

Drupal\Tests\locale\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->cache = $this->createStub(CacheBackendInterface::class);
  $this->keyValueMemoryFactory = new KeyValueMemoryFactory();
  $this->moduleHandler = $this->createStub(ModuleHandlerInterface::class);
  $this->moduleExtensionList = $this->createStub(ModuleExtensionList::class);
  $this->themeExtensionList = $this->createStub(ThemeExtensionList::class);
  $this->config = $this->createStub(ConfigFactoryInterface::class);
  $this->localeProjectRepository = new LocaleProjectRepository($this->cache, $this->keyValueMemoryFactory, $this->moduleHandler, $this->moduleExtensionList, $this->themeExtensionList, $this->config);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.