/** * parses request input * @return array */ public function getRequestData() { $data = $this->request->getInput(); if (is_null($data) || !strlen($data)) { $data = []; } return is_string($data) ? json_decode($data, true) : $data; }
public function testInputGetterAndSetter() { $input = 'testing'; $this->req->setInput($input); $this->assertEquals($input, $this->req->getInput()); }