public function LingotekApiUnitTest::testGetDocument in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetDocument()
@covers ::getDocument
File
- tests/
src/ Unit/ Remote/ LingotekApiUnitTest.php, line 48
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('\\Psr\\Http\\Message\\ResponseInterface')
->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');
}