From 86fa224e354c8365889d2eb2fddd9e496e53da4f Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 22 Sep 2022 16:54:40 +0900 Subject: [PATCH] test: improve test It was a bit difficult to read the code. --- tests/system/View/ParserFilterTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/system/View/ParserFilterTest.php b/tests/system/View/ParserFilterTest.php index 0279e22d3ef6..0e5a7b414af5 100644 --- a/tests/system/View/ParserFilterTest.php +++ b/tests/system/View/ParserFilterTest.php @@ -270,13 +270,15 @@ public function testRound() $parser = new Parser($this->config, $this->viewsDir, $this->loader); $data = [ - 'value1' => 5.55, + 'value1' => 5.555, ]; - $template = '{ value1|round(1) } { value1|round(1, common) } { value1|round(ceil) } { value1|round(floor) } { value1|round(unknown) }'; + $template = '{ value1|round(1) } / { value1|round(1, common) }' + . ' / { value1|round(ceil) } / { value1|round(floor) }' + . ' / { value1|round(unknown) }'; $parser->setData($data); - $this->assertSame('5.6 5.6 6 5 5.55', $parser->renderString($template)); + $this->assertSame('5.6 / 5.6 / 6 / 5 / 5.555', $parser->renderString($template)); } public function testStripTags()