You are here

public function PotxTestCase::testDrupal8RoutingYml in Translation template extractor 7.2

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

Test parsing of Drupal 8 .routing.yml files.

File

tests/potx.test, line 294
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 testDrupal8RoutingYml() {
  $filename = drupal_get_path('module', 'potx') . '/tests/potx_test_8.routing.yml';
  $this
    ->parseFile($filename, POTX_API_8);

  // Look for all title can be extracted
  $this
    ->assertMsgID('Build translation test');
  $this
    ->assertMsgID('Build alternative translation');
  $this
    ->assertMsgIDContext('Translation title in context', 'Title context');
}