private function PotxTest::assertPluralId in Translation template extractor 8
Assert a msgid_plural construct in the .po file.
8 calls to PotxTest::assertPluralId()
- PotxTest::testDrupal5 in tests/
src/ Kernel/ PotxTest.php - Test parsing of Drupal 5 module.
- PotxTest::testDrupal6 in tests/
src/ Kernel/ PotxTest.php - Test parsing of Drupal 6 module.
- PotxTest::testDrupal7 in tests/
src/ Kernel/ PotxTest.php - Test parsing of Drupal 7 module.
- PotxTest::testDrupal8 in tests/
src/ Kernel/ PotxTest.php - Test parsing of Drupal 8 module.
- PotxTest::testDrupal8ConstraintMessages in tests/
src/ Kernel/ PotxTest.php - Test parsing Drupal 8 validation constraint messages.
File
- tests/
src/ Kernel/ PotxTest.php, line 757
Class
- PotxTest
- Ensure that the translation template extractor functions properly.
Namespace
Drupal\Tests\potx\KernelCode
private function assertPluralId($string, $plural, $message = '', $group = 'Other') {
if (!$message) {
$message = new FormattableMarkup('Plural ID "@raw" found', [
'@raw' => $string,
]);
}
$this
->assert(strpos($this->potx_output, 'msgid "' . _potx_format_quoted_string('"' . $string . '"') . "\"\nmsgid_plural \"" . _potx_format_quoted_string('"' . $plural . '"') . '"') !== FALSE, $message, $group);
}