diff --git a/composer.json b/composer.json index 8d413247aa..f56cc0e234 100644 --- a/composer.json +++ b/composer.json @@ -60,6 +60,7 @@ "symfony/process": "3.4.2" }, "require-dev": { + "helmich/phpunit-json-assert": "^2.1", "phpunit/phpunit": "^7.5" }, "config": { diff --git a/composer.lock b/composer.lock index e4def70ed9..81088718c1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8af1f24b91068bfac1ba46b2a0fd55f8", + "content-hash": "6c3c04621824d33ac2f3efe5e2aacead", "packages": [ { "name": "composer/ca-bundle", @@ -1167,6 +1167,91 @@ ], "time": "2017-07-22T11:58:36+00:00" }, + { + "name": "flow/jsonpath", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/FlowCommunications/JSONPath.git", + "reference": "f0222818d5c938e4ab668ab2e2c079bd51a27112" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/f0222818d5c938e4ab668ab2e2c079bd51a27112", + "reference": "f0222818d5c938e4ab668ab2e2c079bd51a27112", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "peekmo/jsonpath": "dev-master", + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Flow\\JSONPath": "src/", + "Flow\\JSONPath\\Test": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Frank", + "email": "stephen@flowsa.com" + } + ], + "description": "JSONPath implementation for parsing, searching and flattening arrays", + "time": "2018-03-04T16:39:47+00:00" + }, + { + "name": "helmich/phpunit-json-assert", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/martin-helmich/phpunit-json-assert.git", + "reference": "8ec83fc433ac60b99b51615fdfb5e061b1371a5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/martin-helmich/phpunit-json-assert/zipball/8ec83fc433ac60b99b51615fdfb5e061b1371a5c", + "reference": "8ec83fc433ac60b99b51615fdfb5e061b1371a5c", + "shasum": "" + }, + "require": { + "flow/jsonpath": "^0.4.0", + "justinrainbow/json-schema": "^5.0", + "php": ">=7.0" + }, + "conflict": { + "phpunit/phpunit": "<6.0 || >= 8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0 | ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Helmich\\JsonAssert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Martin Helmich", + "email": "m.helmich@mittwald.de" + } + ], + "description": "PHPUnit assertions for JSON documents", + "time": "2019-03-22T17:40:25+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.8.1", diff --git a/resources/schema.json b/resources/schema.json index 4320086bf6..d1052b41e9 100644 --- a/resources/schema.json +++ b/resources/schema.json @@ -126,6 +126,7 @@ "type": "object", "additionalProperties": false, "properties": { + "ignore": {"type": "array", "items": {"type": "string"}}, "settings": { "type": "object", "additionalProperties": false, @@ -155,6 +156,7 @@ "type": "object", "additionalProperties": false, "properties": { + "ignore": {"type": "array", "items": {"type": "string"}}, "settings": { "type": "object", "additionalProperties": false, @@ -203,6 +205,7 @@ "type": "object", "additionalProperties": false, "properties": { + "ignore": {"type": "array", "items": {"type": "string"}}, "settings": { "type": "object", "additionalProperties": false, diff --git a/tests/resources/InfectionConfigJsonSchemaTest.php b/tests/resources/InfectionConfigJsonSchemaTest.php new file mode 100644 index 0000000000..9c401dd6fa --- /dev/null +++ b/tests/resources/InfectionConfigJsonSchemaTest.php @@ -0,0 +1,87 @@ + [$mutator]; + } + } + + private static function getSchema() + { + if (self::$schema !== null) { + return self::$schema; + } + + return self::$schema = json_decode(file_get_contents(self::SCHEMA_FILE), true); + } +}