Skip to content

Commit 3063205

Browse files
committed
Validation: added test cases to check support for good negative floats and ints
1 parent 0b7d55c commit 3063205

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/Validator/ArgumentsOfCorrectTypeTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ public function testGoodIntValue()
3434
');
3535
}
3636

37+
/**
38+
* @it Good negative int value
39+
*/
40+
public function testGoodNegativeIntValue()
41+
{
42+
$this->expectPassesRule(new ArgumentsOfCorrectType(), '
43+
{
44+
complicatedArgs {
45+
intArgField(intArg: -2)
46+
}
47+
}
48+
');
49+
}
50+
3751
/**
3852
* @it Good boolean value
3953
*/
@@ -76,6 +90,17 @@ public function testGoodFloatValue()
7690
');
7791
}
7892

93+
public function testGoodNegativeFloatValue()
94+
{
95+
$this->expectPassesRule(new ArgumentsOfCorrectType(), '
96+
{
97+
complicatedArgs {
98+
floatArgField(floatArg: -1.1)
99+
}
100+
}
101+
');
102+
}
103+
79104
/**
80105
* @it Int into Float
81106
*/

0 commit comments

Comments
 (0)