You are here

public static function FileApiFunctionalTest::tearDownAfterClass in TMGMT Translator Smartling 8.3

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

Reset all files in Smartling after tests.

File

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

Class

FileApiFunctionalTest
Test class for File API examples.

Namespace

Smartling\Tests\Functional

Code

public static function tearDownAfterClass() {
  $authProvider = AuthTokenProvider::create(getenv('user_id'), getenv('user_key'));
  $fileApi = FileApi::create($authProvider, getenv('project_id'));
  foreach ([
    self::FILE_NAME,
    self::NEW_FILE_NAME,
  ] as $file) {
    try {
      $fileApi
        ->deleteFile($file);
    } catch (SmartlingApiException $e) {
    }
  }
}