private function PotxTestCase::assertPluralID in Translation template extractor 7.2
Same name and namespace in other branches
- 6.3 tests/potx.test \PotxTestCase::assertPluralID()
- 7.3 tests/potx.test \PotxTestCase::assertPluralID()
- 7 tests/potx.test \PotxTestCase::assertPluralID()
Helper function to assert an msgid_plural construct in the .po file.
7 calls to PotxTestCase::assertPluralID()
- 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::testDrupal8ConstraintMessages in tests/
potx.test - Test parsing Drupal 8 validation constraint messages.
File
- tests/
potx.test, line 567 - 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 assertPluralID($string, $plural, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Plural ID "@raw" found', array(
'@raw' => check_plain($string),
));
}
$this
->assert(strpos($this->potx_output, 'msgid "' . _potx_format_quoted_string('"' . $string . '"') . "\"\nmsgid_plural \"" . _potx_format_quoted_string('"' . $plural . '"') . '"') !== FALSE, $message, $group);
}