From a236087c88d0e7af5ac700359e885818fc02e7e4 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 6 Oct 2020 19:53:44 -0300 Subject: [PATCH] Creates tests for MaskCnpj --- tests/HelpersTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/HelpersTest.php b/tests/HelpersTest.php index 8ffc9aa..999ae2f 100644 --- a/tests/HelpersTest.php +++ b/tests/HelpersTest.php @@ -165,4 +165,13 @@ public function testToInt() $this->assertIsInt($number); } + + public function testMaskCnpj() + { + $wrong = 'aaaaaaaaaaaaa'; + $right = '11222333444455'; + + $this->assertEquals(Helpers::maskCnpj($right), '11.222.333/4444-55'); + $this->assertNull(Helpers::maskCnpj($wrong)); + } }