Skip to content

Commit

Permalink
Merge 6bc18d4 into 059816c
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekman committed Jun 20, 2018
2 parents 059816c + 6bc18d4 commit 2ddfe83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/LuhnAlgorithmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
];
}

Expand Down
8 changes: 4 additions & 4 deletions tests/NumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
];
}

Expand Down

0 comments on commit 2ddfe83

Please sign in to comment.