You are here

private function FileApiTest::prepareFileApiMock in TMGMT Translator Smartling 8.2

Same name in this branch
  1. 8.2 api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::prepareFileApiMock()
  2. 8.2 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::prepareFileApiMock()
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::prepareFileApiMock()
  2. 8.3 vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php \Smartling\Tests\Unit\FileApiTest::prepareFileApiMock()
2 calls to FileApiTest::prepareFileApiMock()
FileApiTest::setUp in api-sdk-php/tests/unit/FileApiTest.php
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
FileApiTest::setUp in vendor/smartling/api-sdk-php/tests/unit/FileApiTest.php
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.

File

api-sdk-php/tests/unit/FileApiTest.php, line 14

Class

FileApiTest
Test class for Smartling\File\FileApi.

Namespace

Smartling\Tests\Unit

Code

private function prepareFileApiMock() {
  $this->object = $this
    ->getMockBuilder('Smartling\\File\\FileApi')
    ->setMethods([
    'readFile',
  ])
    ->setConstructorArgs([
    $this->projectId,
    $this->client,
    null,
    FileApi::ENDPOINT_URL,
  ])
    ->getMock();
  $this->object
    ->expects($this
    ->any())
    ->method('readFile')
    ->willReturn($this->streamPlaceholder);
  $this
    ->invokeMethod($this->object, 'setAuth', [
    $this->authProvider,
  ]);
}