mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
Validation: added test cases to check support for good negative floats and ints
This commit is contained in:
parent
0b7d55c30d
commit
30632050a5
@ -34,6 +34,20 @@ class ArgumentsOfCorrectTypeTest extends TestCase
|
||||
');
|
||||
}
|
||||
|
||||
/**
|
||||
* @it Good negative int value
|
||||
*/
|
||||
public function testGoodNegativeIntValue()
|
||||
{
|
||||
$this->expectPassesRule(new ArgumentsOfCorrectType(), '
|
||||
{
|
||||
complicatedArgs {
|
||||
intArgField(intArg: -2)
|
||||
}
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
/**
|
||||
* @it Good boolean value
|
||||
*/
|
||||
@ -76,6 +90,17 @@ class ArgumentsOfCorrectTypeTest extends TestCase
|
||||
');
|
||||
}
|
||||
|
||||
public function testGoodNegativeFloatValue()
|
||||
{
|
||||
$this->expectPassesRule(new ArgumentsOfCorrectType(), '
|
||||
{
|
||||
complicatedArgs {
|
||||
floatArgField(floatArg: -1.1)
|
||||
}
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
/**
|
||||
* @it Int into Float
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user