You are here

public function FileApiFunctionalTest::testFileApiGetList in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.2 api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::testFileApiGetList()
  2. 8.2 vendor/smartling/api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::testFileApiGetList()
  3. 8.3 vendor/smartling/api-sdk-php/tests/functional/FileApiFunctionalTest.php \Smartling\Tests\Functional\FileApiFunctionalTest::testFileApiGetList()

Test for retrieving file list.

File

vendor/smartling/api-sdk-php/tests/functional/FileApiFunctionalTest.php, line 225

Class

FileApiFunctionalTest
Test class for File API examples.

Namespace

Smartling\Tests\Functional

Code

public function testFileApiGetList() {
  try {
    $params = new ListFilesParameters();
    $params
      ->setFileTypes($this->fileType)
      ->setUriMask('test')
      ->setLimit(5);
    $result = $this->fileApi
      ->getList($params);
    $this
      ->assertArrayHasKey('items', $result);
    $this
      ->assertArrayHasKey('totalCount', $result);
  } catch (SmartlingApiException $e) {
    $this
      ->fail($e
      ->getMessage());
  }
}