public function ContextApiFunctionalTest::setUp in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::setUp()
- 8.2 vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::setUp()
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::setUp()
- 8.3 vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::setUp()
Test mixture.
File
- api-sdk-php/
tests/ functional/ ContextApiFunctionalTest.php, line 26
Class
- ContextApiFunctionalTest
- Test class for Project 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');
}
$authProvider = AuthTokenProvider::create($userIdentifier, $userSecretKey);
$this->contextApi = ContextApi::create($authProvider, $projectId);
}