You are here

private function PotxTestCase::assertNoPluralIDContext in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 tests/potx.test \PotxTestCase::assertNoPluralIDContext()
  2. 7.2 tests/potx.test \PotxTestCase::assertNoPluralIDContext()

Helper function to assert lack of msgid_plural with context in the .po file.

2 calls to PotxTestCase::assertNoPluralIDContext()
PotxTestCase::testDrupal5 in tests/potx.test
Test parsing of Drupal 5 module.
PotxTestCase::testDrupal6 in tests/potx.test
Test parsing of Drupal 6 module.

File

tests/potx.test, line 613
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 assertNoPluralIDContext($string, $plural, $context, $message = '', $group = 'Other') {
  if (!$message) {
    $message = t('No plural ID "@raw" found with context "@context"', array(
      '@raw' => check_plain($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);
}