public function LingotekApiUnitTest::testGetDocument in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetDocument()
@covers ::getDocument
File
- tests/
src/ Unit/ Remote/ LingotekApiUnitTest.php, line 46
Class
- LingotekApiUnitTest
- @coversDefaultClass \Drupal\lingotek\Remote\LingotekApi @group lingotek @preserveGlobalState disabled
Namespace
Drupal\Tests\lingotek\Unit\RemoteCode
public function testGetDocument() {
// Ensure that the right call is done for testing if a document is imported.
$response = $this
->getMockBuilder(ResponseInterface::class)
->disableOriginalConstructor()
->getMock();
$this->client
->expects($this
->at(0))
->method('get')
->with('/api/document/fancy-document-id/status')
->will($this
->returnValue($response));
$this->lingotek_api
->getDocument('fancy-document-id');
}