You are here

public function TranslationRequestsApiFunctionalTest::setUp in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/tests/functional/TranslationRequestsApiFunctionalTest.php \Smartling\Tests\Unit\TranslationRequestsApiFunctionalTest::setUp()

Test mixture.

File

vendor/smartling/api-sdk-php/tests/functional/TranslationRequestsApiFunctionalTest.php, line 23

Class

TranslationRequestsApiFunctionalTest

Namespace

Smartling\Tests\Unit

Code

public function setUp() {
  $projectId = getenv('project_id');
  $userIdentifier = getenv('user_id');
  $userSecretKey = getenv('user_key');
  if (empty($projectId) || empty($userIdentifier) || empty($userSecretKey)) {
    $this
      ->fail('Missing required parameters');
  }
  $authProvider = AuthTokenProvider::create($userIdentifier, $userSecretKey);
  $this->translationRequestsApi = TranslationRequestsApi::create($authProvider, $projectId);
}