From 29d61e3983b7c6096176a08a6692f500e649824b Mon Sep 17 00:00:00 2001 From: Johnathon Koster Date: Wed, 13 Apr 2016 12:59:57 -0500 Subject: [PATCH] Added tests for optional decimal places. --- tests/FormattingTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/FormattingTest.php b/tests/FormattingTest.php index 3fc56c45..aa867cad 100644 --- a/tests/FormattingTest.php +++ b/tests/FormattingTest.php @@ -90,6 +90,15 @@ class FormattingTest extends PHPUnit_Framework_TestCase [1.10, '0000.00', '0001.10'], [2011.10, '0000.00', '2011.10'], [2011.10, '000000.00', '002011.10'], + [100, '0[.]000', '100'], + [100.12, '0[.]000', '100.120'], + [100.12, '0[.]00[0]', '100.12'], + [100.12, '0[.]00[000]', '100.12'], + [100.123, '0[.]00[000]', '100.123'], + [100.1234, '0[.]00[000]', '100.1234'], + [100.12345, '0[.]00[000]', '100.12345'], + [100.123456, '0[.]00[000]', '100.12346'], + [100.123453, '0[.]00[000]', '100.12345'], // specified abbreviations