@@ -68,6 +68,7 @@ $matcher->getError(); // returns null or error message
68
68
* `` @*@ `` || `` @wildcard@ ``
69
69
* `` expr(expression) ``
70
70
* `` @uuid@ ``
71
+ * `` @json@ ``
71
72
* `` @strig@||@integer@ `` - string OR integer
72
73
73
74
### Available pattern expanders
@@ -85,11 +86,12 @@ $matcher->getError(); // returns null or error message
85
86
* `` lowerThan($boundry) ``
86
87
* `` greaterThan($boundry) ``
87
88
* `` inArray($value) ``
88
- * `` oneOf(...$expanders) `` - example
usage `` "@[email protected] (contains('foo'), contains('bar'), contains('baz'))" ``
89
- * `` matchRegex($regex) `` - example
usage `` "@[email protected] ('/^lorem.+/')" ``
89
+ * `` oneOf(...$expanders) `` - example
`` "@[email protected] (contains('foo'), contains('bar'), contains('baz'))" ``
90
+ * `` matchRegex($regex) `` - example
`` "@[email protected] ('/^lorem.+/')" ``
90
91
* `` optional() `` - work's only with `` ArrayMatcher `` , `` JsonMatcher `` and `` XmlMatcher ``
91
- * `` count() `` - work's only with
`` ArrayMatcher `` - example usage
`` "@[email protected] (5)" ``
92
- * `` repeat($pattern, $isStrict = true) `` - example usage
`` '@[email protected] ({"name": "foe"})' `` or
`` "@[email protected] ('@string@')" ``
92
+ * `` count() `` - work's only with
`` ArrayMatcher `` - example
`` "@[email protected] (5)" ``
93
+ * `` repeat($pattern, $isStrict = true) `` - example
`` '@[email protected] ({"name": "foe"})' `` or
`` "@[email protected] ('@string@')" ``
94
+ * `` match($pattern) `` - example
`` {"image":"@[email protected] ({\"url\":\"@[email protected] ()\"})"} ``
93
95
94
96
## Example usage
95
97
@@ -358,6 +360,9 @@ $matcher->match(
358
360
"isAdmin": false,
359
361
"dateOfBirth" null,
360
362
"hasEmailVerified": true
363
+ },
364
+ "avatar": {
365
+ "url": "http://avatar-image.com/avatar.png"
361
366
}
362
367
},
363
368
{
@@ -369,7 +374,8 @@ $matcher->match(
369
374
"isAdmin": true,
370
375
"dateOfBirth" null,
371
376
"hasEmailVerified": true
372
- }
377
+ },
378
+ "avatar": null
373
379
}
374
380
]
375
381
}',
@@ -386,7 +392,8 @@ $matcher->match(
386
392
"attributes": {
387
393
"isAdmin": @boolean@,
388
394
"@*@": "@*@"
389
- }
395
+ },
396
+
390
397
}
391
398
],
392
399
@...@
0 commit comments