public function ContextApiFunctionalTest::testUploadAndMatchContext in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::testUploadAndMatchContext()
- 8.2 api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::testUploadAndMatchContext()
- 8.2 vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php \Smartling\Tests\Functional\ContextApiFunctionalTest::testUploadAndMatchContext()
Test for upload and match context.
File
- vendor/
smartling/ api-sdk-php/ tests/ functional/ ContextApiFunctionalTest.php, line 89
Class
- ContextApiFunctionalTest
- Test class for Project API examples.
Namespace
Smartling\Tests\FunctionalCode
public function testUploadAndMatchContext() {
try {
$fileUri = 'tests/resources/context.html';
$matchParams = new MatchContextParameters();
$matchParams
->setContentFileUri($fileUri);
$params = new UploadContextParameters();
$params
->setContent($fileUri);
$params
->setMatchParams($matchParams);
$params
->setName('test_context.html');
$result = $this->contextApi
->uploadAndMatchContext($params);
$this
->assertArrayHasKey('matchId', $result);
} catch (SmartlingApiException $e) {
$this
->fail($e
->getMessage());
}
}