You are here

private function PotxTest::assertNoPluralIdContext in Translation template extractor 8

Assert the lack of msgid_plural with context in the .po file.

2 calls to PotxTest::assertNoPluralIdContext()
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.

File

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

Class

PotxTest
Ensure that the translation template extractor functions properly.

Namespace

Drupal\Tests\potx\Kernel

Code

private function assertNoPluralIdContext($string, $plural, $context, $message = '', $group = 'Other') {
  if (!$message) {
    $message = new FormattableMarkup('No 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);
}