Exemple #1
0
 /**
  * @throws Exception\TransportException
  * @throws Core\Exception\JsonParseException
  *
  * @return Core\Request|Core\Request[]|null
  */
 private function receive()
 {
     // interrogate the transport for the request
     $requestString = $this->transport->receive();
     // log the request for debugging
     $this->logger->info("Request", array('json' => $requestString));
     // instantiate the request as PHP objects from a string
     return $this->parser->parse($requestString);
 }
 /**
  * @param $json
  * @dataProvider invalidMethodProvider
  */
 public function testInvalidMethod($json)
 {
     $request = $this->parser->parse($json);
     $this->assertNull($request);
 }