You are here

public function PotxTest::testDrupal8RoutingYml in Translation template extractor 8

Test parsing of Drupal 8 .routing.yml files.

File

tests/src/Kernel/PotxTest.php, line 405

Class

PotxTest
Ensure that the translation template extractor functions properly.

Namespace

Drupal\Tests\potx\Kernel

Code

public function testDrupal8RoutingYml() {
  $filename = $this->tests_root . '/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');
  $this
    ->assertPotxErrors([]);
}