You are here

private function PotxTestCase::assertMsgID in Translation template extractor 7.2

Same name and namespace in other branches
  1. 6.3 tests/potx.test \PotxTestCase::assertMsgID()
  2. 7.3 tests/potx.test \PotxTestCase::assertMsgID()
  3. 7 tests/potx.test \PotxTestCase::assertMsgID()

Helper function to assert an msgid construct in the .po file.

17 calls to PotxTestCase::assertMsgID()
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::testDrupal8BreakpointsYml in tests/potx.test
Test parsing of Drupal 8 .breakpoints.yml files.

... See full list

File

tests/potx.test, line 527
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 assertMsgID($string, $message = '', $group = 'Other') {
  if (!$message) {
    $message = t('MsgID "@raw" found', array(
      '@raw' => check_plain($string),
    ));
  }
  $this
    ->assert(strpos($this->potx_output, 'msgid "' . _potx_format_quoted_string('"' . $string . '"') . '"') !== FALSE, $message, $group);
}