public function FileApiTest::testFileUploadParams in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testFileUploadParams()
- 8.2 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testFileUploadParams()
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testFileUploadParams()
- 8.3 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testFileUploadParams()
Tests AutoAuthorize logic
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ FileApiTest.php, line 152
Class
- FileApiTest
- Test class for Smartling\File\FileApi.
Namespace
Smartling\Tests\UnitCode
public function testFileUploadParams() {
$fileUploadParams = new UploadFileParameters();
$fileUploadParams
->setAuthorized(false);
$exportedSettings = $fileUploadParams
->exportToArray();
$this
->assertEquals($exportedSettings['authorize'], false);
$fileUploadParams
->setAuthorized(true);
$exportedSettings = $fileUploadParams
->exportToArray();
$this
->assertEquals($exportedSettings['authorize'], true);
$fileUploadParams
->setLocalesToApprove('locale');
$fileUploadParams
->setAuthorized(false);
$exportedSettings = $fileUploadParams
->exportToArray();
$this
->assertEquals($exportedSettings['authorize'], false);
$fileUploadParams
->setAuthorized(true);
$exportedSettings = $fileUploadParams
->exportToArray();
$this
->assertEquals($exportedSettings['authorize'], false);
}