public function FileApiTest::testGetStatus in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testGetStatus()
- 8.2 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testGetStatus()
- 8.3 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testGetStatus()
@covers \Smartling\File\FileApi::getStatus
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ FileApiTest.php, line 494
Class
- FileApiTest
- Test class for Smartling\File\FileApi.
Namespace
Smartling\Tests\UnitCode
public function testGetStatus() {
$this
->prepareClientResponseMock();
$endpointUrl = vsprintf('%s/%s/locales/%s/file/status', [
FileApi::ENDPOINT_URL,
$this->projectId,
'en-EN',
]);
$this->client
->expects($this
->once())
->method('request')
->with('get', $endpointUrl, [
'headers' => [
'Accept' => 'application/json',
'Authorization' => vsprintf('%s %s', [
$this->authProvider
->getTokenType(),
$this->authProvider
->getAccessToken(),
]),
],
'exceptions' => false,
'query' => [
'fileUri' => 'test.xml',
],
])
->willReturn($this->responseMock);
$this->object
->getStatus('test.xml', 'en-EN');
}