You are here

public function SmartlingTranslatorTest::testFilterDirectivesFilterUnrelatedDirectives in TMGMT Translator Smartling 8.3

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

Test filtering unrelated directives.

File

tests/src/Kernel/SmartlingTranslatorTest.php, line 48

Class

SmartlingTranslatorTest
Tests for smartling translator.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

public function testFilterDirectivesFilterUnrelatedDirectives() {
  $actual = $this->smartlingTranslator
    ->filterDirectives([
    'foo' => 'bar',
    'smartling.entity_escaping' => 'test',
    'smartling.variants_enabled' => 'test',
    'smartling.translate_paths' => 'test',
    'smartling.string_format_paths' => 'test',
    'smartling.placeholder_format_custom' => 'test',
    'smartling.placeholder_format' => 'test',
    'smartling.sltrans' => 'test',
    'smartling.source_key_paths' => 'test',
    'smartling.pseudo_inflation' => 'test',
    'smartling.instruction_paths' => 'test',
    'smartling.character_limit_paths' => 'test',
    'smartling.force_inline_for_tags' => 'test',
  ]);
  $expected = [
    'smartling.entity_escaping' => 'test',
    'smartling.variants_enabled' => 'test',
    'smartling.translate_paths' => 'test',
    'smartling.string_format_paths' => 'test',
    'smartling.placeholder_format_custom' => 'test',
    'smartling.placeholder_format' => 'test',
    'smartling.sltrans' => 'test',
    'smartling.source_key_paths' => 'test',
    'smartling.pseudo_inflation' => 'test',
    'smartling.instruction_paths' => 'test',
    'smartling.character_limit_paths' => 'test',
    'smartling.force_inline_for_tags' => 'test',
  ];
  $this
    ->assertEquals($expected, $actual);
}