Use SchemaValidator to validate tool input (#203)
* Use SchemaValidator to validate tool input * add test * add changelog * fix cs * Improve error message * fix tests * fix tests * fix baseline * update snapshot files * Remove BC compat while switching to v0.3.0 --------- Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
This commit is contained in:
parent
c0938a19bd
commit
ed205ef793
1 changed files with 103 additions and 29 deletions
|
|
@ -50,7 +50,7 @@ abstract class InspectorSnapshotTestCase extends TestCase
|
|||
if (\is_array($value)) {
|
||||
$args[] = \sprintf('%s=%s', $key, json_encode($value));
|
||||
} elseif (\is_bool($value)) {
|
||||
$args[] = \sprintf('%s=%s', $key, $value ? '1' : '0');
|
||||
$args[] = \sprintf('%s=%s', $key, $value ? 'true' : 'false');
|
||||
} else {
|
||||
$args[] = \sprintf('%s=%s', $key, $value);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ abstract class InspectorSnapshotTestCase extends TestCase
|
|||
if (\is_array($value)) {
|
||||
$args[] = \sprintf('%s=%s', $key, json_encode($value));
|
||||
} elseif (\is_bool($value)) {
|
||||
$args[] = \sprintf('%s=%s', $key, $value ? '1' : '0');
|
||||
$args[] = \sprintf('%s=%s', $key, $value ? 'true' : 'false');
|
||||
} else {
|
||||
$args[] = \sprintf('%s=%s', $key, $value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue