From 59630149a2590b290f0c930f1b0da9a9e0b54383 Mon Sep 17 00:00:00 2001 From: Franco Lombardo Date: Sun, 23 Jan 2022 17:10:55 +0100 Subject: [PATCH] Added test case to improve code coverage --- tests/CodiceFiscaleTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/CodiceFiscaleTest.php b/tests/CodiceFiscaleTest.php index 388ff59..f973a5c 100644 --- a/tests/CodiceFiscaleTest.php +++ b/tests/CodiceFiscaleTest.php @@ -32,9 +32,9 @@ function test_checker_can_detect_omocodia($goodFiscalCode) function test_checker_can_detect_badCodes($badFiscalCode) { $chk = new CodiceFiscale(); - + self::assertFalse($chk->validaCodiceFiscale($badFiscalCode), $chk->getErrore() ?? ""); - + self::assertTrue(empty($chk->getGiornoNascita()), 'not empty getGiornoNascita'); self::assertTrue(empty($chk->getMeseNascita()), 'not empty getMeseNascita'); self::assertTrue(empty($chk->getAnnoNascita()), 'not empty getAnnoNascita'); @@ -98,6 +98,11 @@ public function badDataProvider(): array [ "" ], + [ + "!NTPTR60C29H5L1W" + ], [ + "0NTPTR60C29H5L1S" + ], [ "MRARSS82M56F205IXXXX" ],