/** * @Given I get the JSON */ public function getJson() { $this->jsonHolder->setJson($this->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); }