function LocaleTranslationTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::setUp()
  2. 8.9.x core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::setUp()
  3. 10 core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/locale/tests/src/Unit/LocaleTranslationTest.php, line 57

Class

LocaleTranslationTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21locale%21src%21LocaleTranslation.php/class/LocaleTranslation/11.x" title="String translator using the locale module." class="local">\Drupal\locale\LocaleTranslation</a> @group locale

Namespace

Drupal\Tests\locale\Unit

Code

protected function setUp() : void {
    parent::setUp();
    $this->storage = $this->createMock('Drupal\\locale\\StringStorageInterface');
    $this->cache = $this->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
    $this->lock = $this->createMock('Drupal\\Core\\Lock\\LockBackendInterface');
    $this->languageManager = $this->createMock('Drupal\\Core\\Language\\LanguageManagerInterface');
    $this->requestStack = new RequestStack();
}

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