private function PotxTestCase::assertMsgIDContext in Translation template extractor 7.2
Same name and namespace in other branches
- 6.3 tests/potx.test \PotxTestCase::assertMsgIDContext()
- 7.3 tests/potx.test \PotxTestCase::assertMsgIDContext()
- 7 tests/potx.test \PotxTestCase::assertMsgIDContext()
Helper function to assert an msgid with context in the .po file.
9 calls to PotxTestCase::assertMsgIDContext()
- PotxTestCase::testDrupal7 in tests/
potx.test - Test parsing of Drupal 7 module.
- PotxTestCase::testDrupal8 in tests/
potx.test - Test parsing of Drupal 8 module.
- PotxTestCase::testDrupal8CustomYml in tests/
potx.test - Test parsing of custom yaml files.
- PotxTestCase::testDrupal8LocalContextualYml in tests/
potx.test - Test parsing of Drupal 8 local tasks, contextual link and action files.
- PotxTestCase::testDrupal8MenuLinksYml in tests/
potx.test - Test parsing of Drupal 8 menu link files.
File
- tests/
potx.test, line 547 - Tests to ensure that the template extractor works as intended.
Class
- PotxTestCase
- @file Tests to ensure that the template extractor works as intended.
Code
private function assertMsgIDContext($string, $context, $message = '', $group = 'Other') {
if (!$message) {
$message = t('MsgID "@raw" in context "@context" found', array(
'@raw' => check_plain($string),
'@context' => check_plain($context),
));
}
$this
->assert(strpos($this->potx_output, 'msgctxt "' . _potx_format_quoted_string('"' . $context . '"') . "\"\nmsgid \"" . _potx_format_quoted_string('"' . $string . '"') . '"') !== FALSE, $message, $group);
}