Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Updated validator 45 (changed on June 4th 2018)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clemens Weiß committed Oct 9, 2018
1 parent 7a22027 commit 7304f4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions classes/validator/validators/Validator45.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected function getResult()
{
return $this->account{0} === '0'
|| $this->account{4} === '1'
|| substr($this->account, 0, 2) === '48'
|| parent::getResult();
}
}
6 changes: 6 additions & 0 deletions tests/unit/validators/Validator45Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public function provideTestData()
['1000199999', true],
['0100114240', true],

// no check sum because account number starts with 48
['4890001112', true],

['3545343233', false],
['4013410025', false],

Expand All @@ -59,6 +62,9 @@ public function provideTestData()
// no check sum available because 5th position equals 1 (one) - negation
['1000299999', false],
['1100214240', false],

// no check sum because account number starts with 48 - negation
['5890001112', false],
];
}
}

0 comments on commit 7304f4a

Please sign in to comment.