Validation: added test cases to check support for good negative floats and ints

This commit is contained in:
Vladimir Razuvaev 2017-07-05 18:35:45 +07:00
parent 0b7d55c30d
commit 30632050a5

View File

@ -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 * @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 * @it Int into Float
*/ */