You are here

public function FileApiTest::testLastModifiedInvalidResponseNoDataFoundNoItems in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::testLastModifiedInvalidResponseNoDataFoundNoItems()

@covers \Smartling\File\FileApi::lastModified @expectedException \Smartling\Exceptions\SmartlingApiException @expectedExceptionMessage No data found for file test.xml.

File

vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php, line 296

Class

FileApiTest
Test class for Smartling\File\FileApi.

Namespace

Smartling\Tests\Unit

Code

public function testLastModifiedInvalidResponseNoDataFoundNoItems() {
  $this
    ->prepareClientResponseMock(false);
  $this->client
    ->expects($this
    ->once())
    ->method('request')
    ->willReturn($this->responseMock);
  $response = '{"response":{"code":"SUCCESS","messages":[], "data":{}}}';
  $this->responseMock
    ->expects(self::any())
    ->method('getBody')
    ->willReturn($response);
  $this->object
    ->lastModified('test.xml');
}