function BaseFlowTest::testJobCancelingLeadsToAuditLogRecordCreation in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Kernel/BaseFlowTest.php \Drupal\Tests\tmgmt_smartling\Kernel\BaseFlowTest::testJobCancelingLeadsToAuditLogRecordCreation()
Job canceling leads to audit log record creation.
File
- tests/
src/ Kernel/ BaseFlowTest.php, line 97
Class
- BaseFlowTest
- Tests base flows.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
function testJobCancelingLeadsToAuditLogRecordCreation() {
$translate_job = $this
->createJobWithItems([]);
$this->apiWrapperMock
->expects($this
->once())
->method('createAuditLogRecord')
->with($translate_job, NULL, \Drupal::currentUser(), CreateRecordParameters::ACTION_TYPE_CANCEL);
$translate_job
->getTranslatorPlugin()
->abortTranslation($translate_job);
}