Skip to content

Commit a286430

Browse files
committed
test: add float test cases for Strict Rules
1 parent 8e5861d commit a286430

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/system/Validation/StrictRules/RulesTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ public function provideGreaterThanEqualStrict(): Generator
106106
[0, '0', true],
107107
[1, '0', true],
108108
[-1, '0', false],
109+
[1.0, '1', true],
110+
[1.1, '1', true],
111+
[0.9, '1', false],
109112
[true, '0', false],
110113
];
111114
}
@@ -129,6 +132,9 @@ public function provideGreaterThanStrict(): Generator
129132
[-10, '-11', true],
130133
[10, '9', true],
131134
[10, '10', false],
135+
[10.1, '10', true],
136+
[10.0, '10', false],
137+
[9.9, '10', false],
132138
[10, 'a', false],
133139
[true, '0', false],
134140
];
@@ -154,6 +160,9 @@ public function provideLessThanStrict(): Generator
154160
[9, '10', true],
155161
[10, '9', false],
156162
[10, '10', false],
163+
[9.9, '10', true],
164+
[10.1, '10', false],
165+
[10.0, '10', false],
157166
[10, 'a', true],
158167
[true, '0', false],
159168
];
@@ -178,6 +187,9 @@ public function provideLessThanEqualStrict(): Generator
178187
[0, '0', true],
179188
[1, '0', false],
180189
[-1, '0', true],
190+
[1.0, '1', true],
191+
[0.9, '1', true],
192+
[1.1, '1', false],
181193
[true, '0', false],
182194
];
183195
}

0 commit comments

Comments
 (0)