diff --git a/tests/LuhnAlgorithmTest.php b/tests/LuhnAlgorithmTest.php index 2faf68a..4aeb9dd 100644 --- a/tests/LuhnAlgorithmTest.php +++ b/tests/LuhnAlgorithmTest.php @@ -58,6 +58,7 @@ public function provideIsValid_success() [new Number('410321920', 2), true], [new Number('3199723370002', 0), true], [new Number('8914800000397416568', 5), true], + [new Number('12345', 6), false], ]; } diff --git a/tests/NumberTest.php b/tests/NumberTest.php index f17d076..b03d7ca 100644 --- a/tests/NumberTest.php +++ b/tests/NumberTest.php @@ -53,17 +53,17 @@ public function provideFromString_success() /** * @dataProvider provideFromString_fail */ - public function testFromString_fail($number, $checkDigit, $expected) + public function testFromString_fail($number, $expected) { $this->expectException($expected); - new Number($number, $checkDigit); + Number::fromString($number); } public function provideFromString_fail() { return [ - ['', 1, \InvalidArgumentException::class], - ['xyz ', null, \InvalidArgumentException::class], + ['', \InvalidArgumentException::class], + ['xyz ', \InvalidArgumentException::class], ]; }