Exemple #1
0
 /**
  * @Then /^(?:I )?keep the (?:JSON|json)(?: response)?(?: at "(.*)")? as "(.*)"$/
  */
 public function keepJson($path, $key)
 {
     $json = $this->jsonHolder->getJson();
     $this->memoryHelper->memorize($key, $this->jsonHelper->normalize($json, $this->normalizePath($path)));
 }
Exemple #2
0
 /**
  * Prepares JSON for matching
  *
  * @param  string $json
  * @param  array  $options
  * @return string
  */
 private function scrub($json, array $options = [])
 {
     return $this->jsonHelper->generateNormalizedJson($this->jsonHelper->excludeKeys($this->jsonHelper->parse($json, $this->getPath($options)), $this->getExcludedKeys($options)));
 }