private function PotxTest::assertPluralIdContext in Translation template extractor 8
Assert a msgid_plural with context in the .po file.
3 calls to PotxTest::assertPluralIdContext()
- 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::testDrupalJs in tests/
src/ Kernel/ PotxTest.php - Test parsing of a Drupal JS file.
File
- tests/
src/ Kernel/ PotxTest.php, line 767
Class
- PotxTest
- Ensure that the translation template extractor functions properly.
Namespace
Drupal\Tests\potx\KernelCode
private function assertPluralIdContext($string, $plural, $context, $message = '', $group = 'Other') {
if (!$message) {
$message = new FormattableMarkup('Plural ID "@raw" found with context "@context"', [
'@raw' => $string,
'@context' => $context,
]);
}
$this
->assert(strpos($this->potx_output, 'msgctxt "' . _potx_format_quoted_string('"' . $context . '"') . "\"\nmsgid \"" . _potx_format_quoted_string('"' . $string . '"') . "\"\nmsgid_plural \"" . _potx_format_quoted_string('"' . $plural . '"') . '"') !== FALSE, $message, $group);
}