protected function LingotekManagementFormTest::setUp in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 4.0.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.0.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.1.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.2.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.3.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.4.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.5.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.6.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.7.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
- 3.8.x tests/src/Unit/Form/LingotekManagementFormTest.php \Drupal\Tests\lingotek\Unit\Form\LingotekManagementFormTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Form/ LingotekManagementFormTest.php, line 106
Class
- LingotekManagementFormTest
- @coversDefaultClass \Drupal\lingotek\Form\LingotekManagementForm @group lingotek @preserveGlobalState disabled
Namespace
Drupal\Tests\lingotek\Unit\FormCode
protected function setUp() {
parent::setUp();
$this->entityManager = $this
->getMock(EntityManagerInterface::class);
$this->languageManager = $this
->getMock(LanguageManagerInterface::class);
$this->entityQuery = $this
->getMockBuilder(QueryFactory::class)
->disableOriginalConstructor()
->getMock();
$this->lingotek = $this
->getMock(LingotekInterface::class);
$this->lingotekConfiguration = $this
->getMock(LingotekConfigurationServiceInterface::class);
$this->languageLocaleMapper = $this
->getMock(LanguageLocaleMapperInterface::class);
$this->contentTranslationManager = $this
->getMock(ContentTranslationManagerInterface::class);
$this->contentTranslationService = $this
->getMock(LingotekContentTranslationServiceInterface::class);
$this->tempStoreFactory = $this
->getMockBuilder(PrivateTempStoreFactory::class)
->disableOriginalConstructor()
->getMock();
$this->state = $this
->getMock(StateInterface::class);
$this->form = new LingotekManagementForm($this->entityManager, $this->languageManager, $this->entityQuery, $this->lingotek, $this->lingotekConfiguration, $this->languageLocaleMapper, $this->contentTranslationManager, $this->contentTranslationService, $this->tempStoreFactory, $this->state, 'node');
$this->form
->setConfigFactory($this
->getConfigFactoryStub([
'lingotek.settings' => [
'account' => [
'access_token' => 'token',
'login_id' => 'test@example.com',
],
],
]));
$this->form
->setStringTranslation($this
->getStringTranslationStub());
}