You are here

public function PotxTestCase::testDrupal8CustomYml in Translation template extractor 7.2

Same name and namespace in other branches
  1. 6.3 tests/potx.test \PotxTestCase::testDrupal8CustomYml()
  2. 7.3 tests/potx.test \PotxTestCase::testDrupal8CustomYml()

Test parsing of custom yaml files.

File

tests/potx.test, line 343
Tests to ensure that the template extractor works as intended.

Class

PotxTestCase
@file Tests to ensure that the template extractor works as intended.

Code

public function testDrupal8CustomYml() {
  _potx_init_yaml_translation_patterns(drupal_get_path('module', 'potx') . '/tests/potx_test_8/');
  $this
    ->parseFile(drupal_get_path('module', 'potx') . '/tests/potx_test_8/potx_test_8.test.yml', POTX_API_8);
  $this
    ->assertMsgID('Test custom yaml translatable');
  $this
    ->assertMsgIDContext('Test custom yaml translatable with context', 'Yaml translatable context');
}