public function PotxTest::testDrupal8LanguageManager in Translation template extractor 8
Test parsing of the special DrupalManager class in Drupal 8 core.
File
- tests/
src/ Kernel/ PotxTest.php, line 226
Class
- PotxTest
- Ensure that the translation template extractor functions properly.
Namespace
Drupal\Tests\potx\KernelCode
public function testDrupal8LanguageManager() {
$filename = 'LanguageManager.php';
$file_content = "\n<?php\n\n/**\n * @file\n * Contains potx test class of \\Drupal\\Core\\Language\\LanguageManager.\n */\n\n/**\n * Mock class\n */\nclass PotxMockLanguageManager {\n\n public static function getStandardLanguageList() {\n return array(\n 'af' => array('Test English language', 'Test localized language'),\n );\n }\n\n}\n ";
$this
->parsePhpContent($file_content, $filename, POTX_API_8);
$this
->assertMsgId('Test English language');
$this
->assertPotxErrors([]);
}