Beispiel #1
2
 /**
  * @Given I get the JSON
  */
 public function getJson()
 {
     $this->jsonHolder->setJson($this->json);
 }
Beispiel #2
1
 /**
  * @return string
  */
 private function rememberJson($json = null)
 {
     if (null === $json) {
         $json = $this->jsonHolder->getJson();
     }
     return $this->memoryHelper->remember($json);
 }
Beispiel #3
0
 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);
 }