/** * @Given I get the JSON */ public function getJson() { $this->jsonHolder->setJson($this->json); }
/** * @return string */ private function rememberJson($json = null) { if (null === $json) { $json = $this->jsonHolder->getJson(); } return $this->memoryHelper->remember($json); }
public function provideJsonResponse(AfterStepTested $event) { $testResult = $event->getTestResult(); if (!$testResult instanceof ExecutedStepResult) { return; } $callResult = $testResult->getCallResult()->getReturn(); if (!$callResult instanceof \Behat\Mink\Element\DocumentElement) { return; } $response = $callResult->getContent(); $this->jsonHolder->setJson($response); }