public function PotxTestCase::testDrupal8ConstraintMessages in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 tests/potx.test \PotxTestCase::testDrupal8ConstraintMessages()
- 7.2 tests/potx.test \PotxTestCase::testDrupal8ConstraintMessages()
Test parsing Drupal 8 validation constraint messages.
File
- tests/
potx.test, line 496 - Tests to ensure that the template extractor works as intended.
Class
- PotxTestCase
- @file Tests to ensure that the template extractor works as intended.
Code
public function testDrupal8ConstraintMessages() {
$filename = __DIR__ . '/TestConstraint.php';
$this
->parseFile($filename, POTX_API_8);
$this
->assertMsgID('Test message');
$this
->assertMsgID('Test message 2');
$this
->assertPluralID('1 test message', '@count test message');
$this
->assertNoMsgID('Not a message for translation');
}