public function ProjectApiFunctionalTest::setUp in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/functional/ProjectApiFunctionalTest.php \Smartling\Tests\Functional\ProjectApiFunctionalTest::setUp()
- 8.2 api-sdk-php/tests/functional/ProjectApiFunctionalTest.php \Smartling\Tests\Functional\ProjectApiFunctionalTest::setUp()
- 8.2 vendor/smartling/api-sdk-php/tests/functional/ProjectApiFunctionalTest.php \Smartling\Tests\Functional\ProjectApiFunctionalTest::setUp()
Test mixture.
File
- vendor/
smartling/ api-sdk-php/ tests/ functional/ ProjectApiFunctionalTest.php, line 24
Class
- ProjectApiFunctionalTest
- 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->projectApi = ProjectApi::create($authProvider, $projectId);
}