You are here

function BaseFlowTest::testTranslatorSettingsUpdateLeadsToAuditLogRecordCreation in TMGMT Translator Smartling 8.4

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

Translator settings update leads to audit log record creation.

File

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

Class

BaseFlowTest
Tests base flows.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

function testTranslatorSettingsUpdateLeadsToAuditLogRecordCreation() {
  $translate_job = $this
    ->createJobWithItems([]);
  $translator = $translate_job
    ->getTranslator();
  $this->apiWrapperMock
    ->expects($this
    ->once())
    ->method('createAuditLogRecord')
    ->with(NULL, $translator, \Drupal::currentUser(), CreateRecordParameters::ACTION_TYPE_UPDATE_SETTINGS);
  $translator
    ->save();
}