public function TranslationRequestManagerTest::testIsTranslationRequestReadyForDownloadStateTranslatedTrue in TMGMT Translator Smartling 8.4
Is ready for download: true, state translated.
File
- tests/
src/ Kernel/ TranslationRequestManagerTest.php, line 607
Class
- TranslationRequestManagerTest
- Tests TranslationRequestManagerTest class.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
public function testIsTranslationRequestReadyForDownloadStateTranslatedTrue() {
$translation_request_manager_mock = $this
->getMockBuilder(TranslationRequestManager::class)
->setConstructorArgs([
$this->apiWrapperMock,
$this->stateMock,
$this->loggerMock,
])
->setMethods([
'initApiWrapper',
'getTranslationRequest',
])
->getMock();
$translation_request_manager_mock
->expects($this
->once())
->method('initApiWrapper')
->with($this->job);
$translation_request_manager_mock
->expects($this
->once())
->method('getTranslationRequest')
->with($this->job)
->willReturn([
'translationRequestUid' => 'test',
'translationSubmissions' => [
[
'state' => TranslationSubmissionStates::STATE_TRANSLATED,
],
],
]);
$this
->assertEquals($translation_request_manager_mock
->isTranslationRequestReadyForDownload($this->job), TRUE);
}