private function PotxTestCase::assertNoMsgIDContext in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 tests/potx.test \PotxTestCase::assertNoMsgIDContext()
- 7 tests/potx.test \PotxTestCase::assertNoMsgIDContext()
- 7.2 tests/potx.test \PotxTestCase::assertNoMsgIDContext()
Helper function to assert an msgid with context in the .po file.
5 calls to PotxTestCase::assertNoMsgIDContext()
- PotxTestCase::testDrupal5 in tests/
potx.test - Test parsing of Drupal 5 module.
- PotxTestCase::testDrupal6 in tests/
potx.test - Test parsing of Drupal 6 module.
- 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::testDrupal8Twig in tests/
potx.test - Test parsing of Drupal 8 Twig templates.
File
- tests/
potx.test, line 611 - 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 assertNoMsgIDContext($string, $context, $message = '', $group = 'Other') {
if (!$message) {
$message = t('No MsgID "@raw" in context "@context" found', array(
'@raw' => check_plain($string),
'@context' => check_plain($context),
));
}
$this
->assert(strpos($this->potx_output, 'msgid "' . _potx_format_quoted_string('"' . $string . '"') . '"' . "\nmsgctxt \"" . _potx_format_quoted_string('"' . $context . '"') . '"') === FALSE, $message, $group);
}