You are here

protected function LingotekSettingsConnectFormTest::setUp in Lingotek Translation 3.7.x

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

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/LingotekSettingsConnectFormTest.php, line 65

Class

LingotekSettingsConnectFormTest
@coversDefaultClass \Drupal\lingotek\Form\LingotekSettingsConnectForm @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->urlGenerator = $this
    ->createMock(UrlGeneratorInterface::class);
  $this->linkGenerator = $this
    ->createMock(LinkGeneratorInterface::class);
  $messenger = $this
    ->createMock(MessengerInterface::class);
  $this->form = new LingotekSettingsConnectForm($this->lingotek, $this->configFactory, $this->urlGenerator, $this->linkGenerator);
  $this->form
    ->setStringTranslation($this
    ->getStringTranslationStub());
  $this->form
    ->setMessenger($messenger);
}