diff --git a/test/Opis/Filter/DbalRecordExistsFilterTest.php b/test/Opis/Filter/DbalRecordExistsFilterTest.php index 9f8c4a8..061b92d 100644 --- a/test/Opis/Filter/DbalRecordExistsFilterTest.php +++ b/test/Opis/Filter/DbalRecordExistsFilterTest.php @@ -64,7 +64,7 @@ public function testInValidator(): void {"key": "exists"} JSON; $data = json_decode($data); - $result = $validator->validate($data, 'test:test/test-db-filter.json'); + $result = $validator->validate($data, 'test:test/test-dbal-filter.json'); $this->assertTrue($result->isValid()); } diff --git a/test/test-dbal-filter.json b/test/test-dbal-filter.json new file mode 100644 index 0000000..6ebb5a4 --- /dev/null +++ b/test/test-dbal-filter.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "properties": { + "key": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "$filters": [ + { + "$func": "dbal-exists", + "$vars": { + "db": "dbal", + "table": "foo", + "field": "key", + "exists": true + } + } + ] + } + }, + "required": ["key"], + "additionalProperties": false +} \ No newline at end of file