public function FileApiFunctionalTest::setUp in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::setUp()
- 8.2 vendor/smartling/api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::setUp()
- 8.3 vendor/smartling/api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::setUp()
Test mixture.
File
- vendor/
smartling/ api-sdk-php/ tests/ functional/ FileApiFunctionalTest.php, line 84
Class
- FileApiFunctionalTest
- Test class for File API examples.
Namespace
Smartling\Tests\FunctionalCode
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');
}
$this->fileUri = 'tests/resources/test.xml';
$this->fileRealPath = realpath($this->fileUri);
$this->fileType = 'xml';
$this->retrievalType = 'pseudo';
$this->translationState = 'PUBLISHED';
$this->targetLocale = 'ru-RU';
$authProvider = AuthTokenProvider::create($userIdentifier, $userSecretKey);
$this->fileApi = FileApi::create($authProvider, $projectId);
}