public function testObjectInput()
 {
     $input = $this->setupInput(json_encode(['some' => 'data']));
     $parser = new RequestParser($input);
     $request = $parser->parseIncoming();
     $this->assertInstanceOf(Request::class, $request);
 }
Exemple #2
0
 /**
  * Runs the application.
  */
 public function run()
 {
     $this->request = $this->requestParser->parseIncoming();
     if ($this->validateRequest()) {
         $this->response = $this->pipeline->execute($this->request);
     }
     $this->sendResponse($this->response);
 }