You are here

protected function LingotekDashboardControllerTest::setUp in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  2. 4.0.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  3. 3.0.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  4. 3.1.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  5. 3.2.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  6. 3.3.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  7. 3.4.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  8. 3.5.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  9. 3.6.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  10. 3.7.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()
  11. 3.8.x tests/src/Unit/Controller/LingotekDashboardControllerTest.php \Drupal\Tests\lingotek\Unit\Controller\LingotekDashboardControllerTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Controller/LingotekDashboardControllerTest.php, line 108

Class

LingotekDashboardControllerTest
@coversDefaultClass \Drupal\lingotek\Controller\LingotekDashboardController @group lingotek @preserveGlobalState disabled

Namespace

Drupal\Tests\lingotek\Unit\Controller

Code

protected function setUp() {
  parent::setUp();
  $this->request = $this
    ->createMock(Request::class);
  $this->configFactory = $this
    ->getConfigFactoryStub([
    'lingotek.settings' => [
      'account' => [
        'access_token' => 'at',
        'login_id' => 'login',
      ],
    ],
  ]);
  $this->entityTypeManager = $this
    ->createMock(EntityTypeManagerInterface::class);
  $this->languageManager = $this
    ->createMock(LanguageManagerInterface::class);
  $this->lingotek = $this
    ->createMock(LingotekInterface::class);
  $this->languageLocaleMapper = $this
    ->createMock(LanguageLocaleMapperInterface::class);
  $this->lingotekConfiguration = $this
    ->createMock(LingotekConfigurationServiceInterface::class);
  $this->formBuilder = $this
    ->createMock(FormBuilderInterface::class);
  $this->logger = $this
    ->createMock(LoggerInterface::class);
  $this->controller = new LingotekDashboardController($this->request, $this->configFactory, $this->entityTypeManager, $this->languageManager, $this->lingotek, $this->languageLocaleMapper, $this->lingotekConfiguration, $this->formBuilder, $this->logger);
  $this->controller
    ->setStringTranslation($this
    ->getStringTranslationStub());
}