Skip to content

Commit 83f026d

Browse files
committed
test: add test
1 parent 7be2371 commit 83f026d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/system/View/ParserFilterTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,20 @@ public function testLocalCurrency()
396396
$this->assertSame("1.234.567,89\u{a0}", $parser->renderString($template));
397397
}
398398

399+
public function testLocalCurrencyWithoutFraction()
400+
{
401+
$parser = new Parser($this->config, $this->viewsDir, $this->loader);
402+
403+
$data = [
404+
'mynum' => 1_234_567.8912346,
405+
];
406+
407+
$template = '{ mynum|local_currency(EUR,de_DE) }';
408+
409+
$parser->setData($data);
410+
$this->assertSame("1.234.568\u{a0}", $parser->renderString($template));
411+
}
412+
399413
public function testParsePairWithAbs()
400414
{
401415
$parser = new Parser($this->config, $this->viewsDir, $this->loader);

0 commit comments

Comments
 (0)