Skip to content

Commit

Permalink
Fix 7.4 test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moln committed Aug 10, 2021
1 parent 21e6629 commit 995b4c8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/Opis/TransformersParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ public function testTransformerVars(): void
}
JSON;
$data = json_decode($data);

if (strpos(PHP_VERSION, '7.4.') === 0) {
$schema = '{"0": true}';
} else {
$schema = '{"binary": true}';
}

$result = $validator->validate(
$data,
<<<JSON
Expand All @@ -73,9 +80,7 @@ public function testTransformerVars(): void
"type": "string",
"\$transformers": {
"\$func": "md5",
"\$vars": {
"binary": true
}
"\$vars": $schema
}
}
}
Expand Down

0 comments on commit 995b4c8

Please sign in to comment.