Skip to content

Commit 6c06fb9

Browse files
committed
Improve tests
1 parent 9d8e34a commit 6c06fb9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/LuhnAlgorithmTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function provideIsValid_success()
5656
return [
5757
[new Number('12345', 5), true, "Valid number"],
5858
[new Number('0', 0), true, "Zero"],
59-
[new Number(((string) PHP_INT_MAX).'2', 1), true, "Larger than INT_MAX"],
59+
[new Number('92233720368547758072', 8), true, "Larger than INT_MAX"],
6060
[new Number('12345', 6), false, "Invalid number"],
6161
];
6262
}
@@ -104,7 +104,7 @@ public function provideCalcCheckDigit_success()
104104
{
105105
return [
106106
[new Number(12345), 5, "Valid number"],
107-
[new Number(5591148845), 2, "Swedish company organization ID"],
107+
[new Number(559114884), 5, "Swedish company organization ID"],
108108
];
109109
}
110110
}

tests/NumberTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function provideFromString_success()
4545
[4103219202, new Number('410321920', 2), "Integer"],
4646
['89148000003974165685', new Number('8914800000397416568', 5), "Large number"],
4747
['abc123', new Number('12', 3), "Character in string"],
48-
[((string) PHP_INT_MAX).'21', new Number(((string) PHP_INT_MAX).'2', 1), "Larger than INT_MAX"],
48+
['922337203685477580721', new Number('92233720368547758072', 1), "Larger than INT_MAX"],
4949
];
5050
}
5151

@@ -63,7 +63,6 @@ public function provideFromString_fail()
6363
return [
6464
['', \InvalidArgumentException::class, "Empty string"],
6565
['xyz ', \InvalidArgumentException::class, "Invalid string"],
66-
[nullm \InvalidArgumentException::class, "Null"],
6766
];
6867
}
6968

@@ -96,7 +95,6 @@ public function provideNew_fail()
9695
return [
9796
['abc123', 1, \InvalidArgumentException::class, "Invalid number"],
9897
['123 ', null, \InvalidArgumentException::class, "Whitespace"],
99-
[null, null, \InvalidArgumentException::class, "Null"],
10098
];
10199
}
102100

0 commit comments

Comments
 (0)