$visitor =
new TranslationNodeVisitor();
$visitor->
enable();
$visitor->
enterNode($node,
$env);
$visitor->
leaveNode($node,
$env);
$this->
assertEquals($expectedMessages,
$visitor->
getMessages());
} public function testMessageExtractionWithInvalidDomainNode() { $message = 'new key';
$node =
new FilterExpression( new ConstantExpression($message, 0
),
new ConstantExpression('trans', 0
),
new Node([ new ArrayExpression([], 0
),
new NameExpression('variable', 0
),
]),
0
);
$this->
testMessagesExtraction($node,
[[$message, TranslationNodeVisitor::UNDEFINED_DOMAIN
]]);
}