Skip to content

Commit

Permalink
Merge pull request #4 from f-lombardo/master
Browse files Browse the repository at this point in the history
Added test case to improve code coverage
  • Loading branch information
nigrosimone committed Jan 23, 2022
2 parents 15ea3ee + 5963014 commit 7a8be71
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/CodiceFiscaleTest.php
Original file line number Diff line number Diff line change
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 7a8be71

Please sign in to comment.