You are here

function BaseFlowTest::testJobFileDeletionInDashboardSuccess in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/BaseFlowTest.php \Drupal\Tests\tmgmt_smartling\Kernel\BaseFlowTest::testJobFileDeletionInDashboardSuccess()

Delete file in Smartling dashboard when corresponding TMGMT job is deleted.

File

tests/src/Kernel/BaseFlowTest.php, line 43

Class

BaseFlowTest
Tests base flows.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

function testJobFileDeletionInDashboardSuccess() {
  $translate_job = $this
    ->createJobWithItems([]);
  $this->apiWrapperMock
    ->expects($this
    ->once())
    ->method('createAuditLogRecord')
    ->with($translate_job, NULL, \Drupal::currentUser(), CreateRecordParameters::ACTION_TYPE_DELETE);
  $this->apiWrapperMock
    ->expects($this
    ->once())
    ->method('deleteFile')
    ->with('JobID1_en_de.xml');
  $translate_job
    ->delete();
}