Lines Matching refs:this

58         $this->data          = $data;
59 $this->expectInvalid = $expectInvalid;
75 $this->checkIfValid() &&
76 $this->checkDefaultHeaders($contentType) &&
77 $body !== $this->rawBody
80 $this->error(
82 "==> does not match the actual body:\n$this->rawBody"
85 $this->error(
86 "The expected body '$body' does not match actual body '$this->rawBody'"
91 return $this;
105 $rawData = $this->getBody('application/json');
108 $this->error(
114 return $this;
118 $this->error(
122 return $this;
130 return $this->expectBody('');
143 $this->checkHeader($name, $value);
145 return $this;
157 $errorData = $this->getErrorData();
162 $this->error($expectedErrorMessage);
165 return $this;
176 $headers = $this->getHeaders();
178 return $this;
181 $this->error('Status is expected but not supplied');
184 $this->error("Status is $statusMessage but the actual value is {$headers['status']}");
186 return $this;
195 return $this->expectStatus(null);
205 return $this->expectError(null);
217 if ($this->checkIfValid() && $this->checkDefaultHeaders($contentType)) {
218 return $this->rawBody;
231 var_dump($this->getBody($contentType));
241 echo $this->getBody($contentType) . "\n";
251 echo $this->data['out_response'] . "\n";
253 echo $this->data['err_response'] . "\n";
262 return $this->data['err_response'];
272 if ($this->isValid()) {
276 if ( ! $this->expectInvalid) {
277 $this->error("The response is invalid: $this->rawData");
294 ( ! ini_get('expose_php') || $this->checkHeader('X-Powered-By', '|^PHP/8|', true)) &&
295 $this->checkHeader('Content-type', '|^' . $contentType . '(;\s?charset=\w+)?|', true)
311 $headers = $this->getHeaders();
313 return $this->error("The header $name is not present");
322 return $this->error("The header $name value '$header' is not the same as '$value'");
326 return $this->error("The header $name value '$header' does not match RegExp '$value'");
339 if ( ! $this->isValid()) {
343 if (is_array($this->headers)) {
344 return $this->headers;
347 $headerRows = explode("\r\n", $this->rawHeaders);
352 $this->error("Invalid header row (no colon): $headerRow");
359 return ($this->headers = $headers);
367 if ($this->valid === null) {
368 $this->processData();
371 return $this->valid;
379 $this->rawData = $this->data['out_response'];
380 $this->valid = (
381 ! is_null($this->rawData) &&
382 strpos($this->rawData, self::HEADER_SEPARATOR)
384 if ($this->valid) {
385 list ($this->rawHeaders, $this->rawBody) = array_map(
387 explode(self::HEADER_SEPARATOR, $this->rawData)