You are here

public function TmgmtSmartlingLogSettingsTest::testSettingsInvalidYaml in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 modules/tmgmt_smartling_log_settings/tests/src/Functional/TmgmtSmartlingLogSettingsTest.php \Drupal\Tests\tmgmt_smartling_log_settings\Functional\TmgmtSmartlingLogSettingsTest::testSettingsInvalidYaml()

Tests the tmgmt_smartling_log_settings settings page: invalid yaml.

File

modules/tmgmt_smartling_log_settings/tests/src/Functional/TmgmtSmartlingLogSettingsTest.php, line 50

Class

TmgmtSmartlingLogSettingsTest
Tests TmgmtSmartlingLogSettingsTest settings.

Namespace

Drupal\Tests\tmgmt_smartling_log_settings\Functional

Code

public function testSettingsInvalidYaml() {
  $this
    ->drupalPostForm('admin/config/development/logging', [
    'tmgmt_smartling_log_settings_severity_mapping' => "smartling_api: info\r\n- tmgmt_smartling: notice",
  ], t('Save configuration'));
  $this
    ->assertSession()
    ->pageTextContains(t('Config must be a valid yaml.'));
}