private function BatchApiTest::prepareBatchApiMock in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 vendor/smartling/api-sdk-php/tests/unit/BatchApiTest.php \Smartling\Tests\Unit\BatchApiTest::prepareBatchApiMock()
Sets up api mock object.
1 call to BatchApiTest::prepareBatchApiMock()
- BatchApiTest::setUp in vendor/
smartling/ api-sdk-php/ tests/ unit/ BatchApiTest.php - Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
File
- vendor/
smartling/ api-sdk-php/ tests/ unit/ BatchApiTest.php, line 25
Class
- BatchApiTest
- Test class for Smartling\Batch\BatchApi.
Namespace
Smartling\Tests\UnitCode
private function prepareBatchApiMock() {
$this->object = $this
->getMockBuilder('Smartling\\Batch\\BatchApi')
->setMethods([
'readFile',
])
->setConstructorArgs([
$this->projectId,
$this->client,
null,
BatchApi::ENDPOINT_URL,
])
->getMock();
$this->object
->expects(self::any())
->method('readFile')
->willReturn($this->streamPlaceholder);
$this
->invokeMethod($this->object, 'setAuth', [
$this->authProvider,
]);
}