public function JobsApiFunctionalTest::testJobsApiAuthorizeJob in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 vendor/smartling/api-sdk-php/tests/functional/JobsApiFunctionalTest.php \Smartling\Tests\Functional\JobsApiFunctionalTest::testJobsApiAuthorizeJob()
Test for job authorize.
File
- vendor/
smartling/ api-sdk-php/ tests/ functional/ JobsApiFunctionalTest.php, line 246
Class
- JobsApiFunctionalTest
- Test class for Jobs API examples.
Namespace
Smartling\Tests\FunctionalCode
public function testJobsApiAuthorizeJob() {
try {
$this->fileApi
->uploadFile('tests/resources/test.xml', 'test.xml', 'xml');
$params = new AddFileToJobParameters();
$params
->setFileUri('test.xml');
$this->jobsApi
->addFileToJobSync($this->jobId, $params);
$this->jobsApi
->authorizeJob($this->jobId);
$this->fileApi
->deleteFile('test.xml');
} catch (SmartlingApiException $e) {
$this
->fail($e
->getMessage());
}
}