diff --git a/tests/Validator/TestCase.php b/tests/Validator/TestCase.php index 0df6386..ed77714 100644 --- a/tests/Validator/TestCase.php +++ b/tests/Validator/TestCase.php @@ -343,11 +343,11 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase function expectPassesCompleteValidation($queryString) { - $this->expectValid($this->getDefaultSchema(), $this->getAllRules(), $queryString); + $this->expectValid($this->getDefaultSchema(), DocumentValidator::allRules(), $queryString); } function expectFailsCompleteValidation($queryString, $errors) { - $this->expectInvalid($this->getDefaultSchema(), $this->getAllRules(), $queryString, $errors); + $this->expectInvalid($this->getDefaultSchema(), DocumentValidator::allRules(), $queryString, $errors); } } diff --git a/tests/Validator/ValidationTest.php b/tests/Validator/ValidationTest.php new file mode 100644 index 0000000..8fb51ea --- /dev/null +++ b/tests/Validator/ValidationTest.php @@ -0,0 +1,30 @@ +expectPassesCompleteValidation(' + query { + catOrDog { + ... on Cat { + furColor + } + ... on Dog { + isHousetrained + } + } + } + '); + } +}