Skip to content

Commit 43760fa

Browse files
authored
Bugfix in Number::fromString() test. (#14)
* Bugfix in Number::fromString() test * Update LuhnAlgorithmTest.php
1 parent 059816c commit 43760fa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/LuhnAlgorithmTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function provideIsValid_success()
5858
[new Number('410321920', 2), true],
5959
[new Number('3199723370002', 0), true],
6060
[new Number('8914800000397416568', 5), true],
61+
[new Number('12345', 6), false],
6162
];
6263
}
6364

tests/NumberTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ public function provideFromString_success()
5353
/**
5454
* @dataProvider provideFromString_fail
5555
*/
56-
public function testFromString_fail($number, $checkDigit, $expected)
56+
public function testFromString_fail($number, $expected)
5757
{
5858
$this->expectException($expected);
59-
new Number($number, $checkDigit);
59+
Number::fromString($number);
6060
}
6161

6262
public function provideFromString_fail()
6363
{
6464
return [
65-
['', 1, \InvalidArgumentException::class],
66-
['xyz ', null, \InvalidArgumentException::class],
65+
['', \InvalidArgumentException::class],
66+
['xyz ', \InvalidArgumentException::class],
6767
];
6868
}
6969

0 commit comments

Comments
 (0)