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