You are here

protected function LingotekSettingsTabAccountFormTest::setUp in Lingotek Translation 3.4.x

Same name in this branch
  1. 3.4.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::setUp()
  2. 3.4.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
Same name and namespace in other branches
  1. 4.0.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
  2. 3.3.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
  3. 3.5.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
  4. 3.6.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
  5. 3.7.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()
  6. 3.8.x tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekSettingsTabAccountFormTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/LingotekSettingsTabAccountFormTest.php, line 66

Class

LingotekSettingsTabAccountFormTest
@coversDefaultClass \Drupal\lingotek\Form\LingotekSettingsTabAccountForm @group lingotek @preserveGlobalState disabled

Namespace

Drupal\Tests\lingotek\Unit\Form

Code

protected function setUp() : void {
  parent::setUp();
  $this->lingotek = $this
    ->createMock(LingotekInterface::class);
  $this->configFactory = $this
    ->createMock(ConfigFactoryInterface::class);
  $this->lingotekFilterManager = $this
    ->createMock(LingotekFilterManagerInterface::class);
  $this->urlGenerator = $this
    ->createMock(UrlGeneratorInterface::class);
  $this->linkGenerator = $this
    ->createMock(LinkGeneratorInterface::class);
  $messenger = $this
    ->createMock(MessengerInterface::class);
  $this->form = new LingotekSettingsTabAccountForm($this->lingotek, $this->configFactory, $this->lingotekFilterManager, $this->urlGenerator, $this->linkGenerator);
  $this->form
    ->setStringTranslation($this
    ->getStringTranslationStub());
  $this->form
    ->setMessenger($messenger);
}