From 30632050a5c1956679aa3e190440ac817ba076e5 Mon Sep 17 00:00:00 2001 From: Vladimir Razuvaev Date: Wed, 5 Jul 2017 18:35:45 +0700 Subject: [PATCH] Validation: added test cases to check support for good negative floats and ints --- .../Validator/ArgumentsOfCorrectTypeTest.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/Validator/ArgumentsOfCorrectTypeTest.php b/tests/Validator/ArgumentsOfCorrectTypeTest.php index 96b1f27..5aefb8c 100644 --- a/tests/Validator/ArgumentsOfCorrectTypeTest.php +++ b/tests/Validator/ArgumentsOfCorrectTypeTest.php @@ -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 */