public function TranslationRequestManagerTest::testIsTranslationRequestReadyForDownloadStateNewFalse in TMGMT Translator Smartling 8.4
Is ready for download: false, state new.
File
- tests/
src/ Kernel/ TranslationRequestManagerTest.php, line 664
Class
- TranslationRequestManagerTest
- Tests TranslationRequestManagerTest class.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
public function testIsTranslationRequestReadyForDownloadStateNewFalse() {
$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_NEW,
],
],
]);
$this
->assertEquals($translation_request_manager_mock
->isTranslationRequestReadyForDownload($this->job), FALSE);
}