|
@@ 115-124 (lines=10) @@
|
| 112 |
|
/** |
| 113 |
|
* @Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should( not)? include (".*"|\-?\d+(?:\.\d+)?(?:[eE][\+\-]?\d+)?|\[.*\]|%?\{.*\}|true|false|null)$/ |
| 114 |
|
*/ |
| 115 |
|
public function checkInclusionInline($path, $isNegative, $json) |
| 116 |
|
{ |
| 117 |
|
$this |
| 118 |
|
->json($this->rememberJson()) |
| 119 |
|
->includes($this->rememberJson($json), [ |
| 120 |
|
'at' => $this->normalizePath($path), |
| 121 |
|
JsonMatcher::OPTION_NEGATIVE => !!$isNegative |
| 122 |
|
]) |
| 123 |
|
; |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
/** |
| 127 |
|
* @Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should have the following(:)$/ |
|
@@ 159-168 (lines=10) @@
|
| 156 |
|
/** |
| 157 |
|
* @Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should( not)? be an? (.*)$/ |
| 158 |
|
*/ |
| 159 |
|
public function haveType($path, $isNegative, $type) |
| 160 |
|
{ |
| 161 |
|
$this |
| 162 |
|
->json($this->rememberJson()) |
| 163 |
|
->hasType($type, [ |
| 164 |
|
'at' => $this->normalizePath($path), |
| 165 |
|
JsonMatcher::OPTION_NEGATIVE => !!$isNegative |
| 166 |
|
]) |
| 167 |
|
; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
/** |
| 171 |
|
* @Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should( not)? have (\d+)/ |