Skip to content

Commit

Permalink
Be sure the debug flag is set to false on testEnableDebugNotEnabled
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Feb 25, 2021
1 parent 3ae2a72 commit ca52902
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/Node/TransTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function testEnableDebugNotEnabled(): void
new TextNode(' pending tasks', 0),
], [], 0);
$notes = new TextNode('Notes for translators', 0);
TransNode::$enableAddDebugInfo = false;
TransNode::$notesLabel = '// custom: ';
$node = new TransNode($body, $plural, $count, null, $notes, null, 80);

Expand All @@ -86,6 +87,7 @@ public function testEnableDebugNotEnabled(): void
$sourceCode = $compiler->compile($node)->getSource();
$this->assertSame("// custom: Notes for translators\n" . 'echo strtr(ngettext("There is 1 pending task", "There are %count% pending tasks", abs(5)), array("%count%" => abs(5), ));' . "\n", $sourceCode);
$this->assertSame([], $compiler->getDebugInfo());
TransNode::$enableAddDebugInfo = false;
TransNode::$notesLabel = '// notes: ';
}

Expand Down

0 comments on commit ca52902

Please sign in to comment.