Skip to content

Commit

Permalink
Added test case to improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lombardo committed Jan 23, 2022
1 parent 15ea3ee commit 5963014
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/CodiceFiscaleTest.php
Expand Up @@ -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');
Expand Down Expand Up @@ -98,6 +98,11 @@ public function badDataProvider(): array
[
""
],
[
"!NTPTR60C29H5L1W"
], [
"0NTPTR60C29H5L1S"
],
[
"MRARSS82M56F205IXXXX"
],
Expand Down

0 comments on commit 5963014

Please sign in to comment.