You are here

private function PotxTest::assertMsgId in Translation template extractor 8

Assert a msgid construct in the .po file.

18 calls to PotxTest::assertMsgId()
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::testDrupal7WithSyntaxError in tests/src/Kernel/PotxTest.php
Test parsing of Drupal 7 module with a syntax error.
PotxTest::testDrupal8 in tests/src/Kernel/PotxTest.php
Test parsing of Drupal 8 module.

... See full list

File

tests/src/Kernel/PotxTest.php, line 717

Class

PotxTest
Ensure that the translation template extractor functions properly.

Namespace

Drupal\Tests\potx\Kernel

Code

private function assertMsgId($string, $message = '', $group = 'Other') {
  if (!$message) {
    $message = new FormattableMarkup('MsgID "@raw" found', [
      '@raw' => $string,
    ]);
  }
  $this
    ->assert(strpos($this->potx_output, 'msgid "' . _potx_format_quoted_string('"' . $string . '"') . '"') !== FALSE, $message, $group);
}