-
-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Description
Hi
I'm using php-matcher to match some JSONs and I found an issue.
If in $value
will be empty array php-matcher always return true.
For example, as $value
I have
{"status":"ok","data":[]}
And as $pattern
{
"status": "ok",
"data": [
{
"id": @integer@,
"code": "123987",
"name": "Anvill",
"short_description": "ACME Anvill",
"url": "http://test-store.example.com/p/123987",
"image": {
"url": "http://test-store.example.com/i/123987-0.jpg",
"description": "ACME Anvill"
},
"price": 95,
"promotion_description": "Anvills sale"
},
{
"id": @integer@,
"code": "123988",
"name": "Red Anvill",
"short_description": "Red ACME Anvill",
"url": "http://test-store.example.com/p/123988",
"image": {
"url": "http://test-store.example.com/i/123988-0.jpg",
"description": "ACME Anvill"
},
"price": 44.99,
"promotion_description": "Red is cheap"
}
]
}
And matcher return true.
Metadata
Metadata
Assignees
Labels
No labels