You are here

public function TranslationRequestManagerTest::testCommitSuccessfulDownloadNoSubmissionInRequest in TMGMT Translator Smartling 8.4

Test download success flow: no submission in request.

File

tests/src/Kernel/TranslationRequestManagerTest.php, line 580

Class

TranslationRequestManagerTest
Tests TranslationRequestManagerTest class.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

public function testCommitSuccessfulDownloadNoSubmissionInRequest() {
  $translation_request = [
    'translationRequestUid' => 'test_translation_request_uid',
    'translationSubmissions' => [],
  ];
  $translation_request_manager_mock = $this
    ->getMockBuilder(TranslationRequestManager::class)
    ->setConstructorArgs([
    $this->apiWrapperMock,
    $this->stateMock,
    $this->loggerMock,
  ])
    ->setMethods([
    'initApiWrapper',
  ])
    ->getMock();
  $translation_request_manager_mock
    ->expects($this
    ->once())
    ->method('initApiWrapper')
    ->with($this->job);
  $this->apiWrapperMock
    ->expects($this
    ->never())
    ->method('updateTranslationRequest');
  $translation_request_manager_mock
    ->commitSuccessfulDownload($this->job, $translation_request);
}