We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e458b3 commit 7a4e64dCopy full SHA for 7a4e64d
tests/JsonSchemaTestSuiteTest.php
@@ -34,7 +34,16 @@ public function testTestCaseValidatesCorrectly(
34
$this->loadRemotesIntoStorage($schemaStorage);
35
$validator = new Validator(new Factory($schemaStorage));
36
37
- $validator->validate($data, $schema);
+ try {
38
+ $validator->validate($data, $schema);
39
+ } catch (\Exception $e) {
40
+ if ($optional) {
41
+ $this->markTestSkipped('Optional test case would during validate() invocation');
42
+ return;
43
+ }
44
+
45
+ throw $e;
46
47
48
if ($optional && $expectedValidationResult !== (count($validator->getErrors()) === 0)) {
49
$this->markTestSkipped('Optional test case would fail');
0 commit comments