Webiny\Component\Rest\Response\CallbackResult::getOutput PHP Method

getOutput() public method

Returns the output in form of an array.
public getOutput ( ) : array
return array
    public function getOutput()
    {
        return $this->outputArray;
    }

Usage Example

Exemplo n.º 1
0
 public function testErrorResponse()
 {
     $cr = new CallbackResult();
     $cr->setErrorResponse('Error message', 'Error desc', '555');
     $cr->addErrorMessage(['ref' => 'testing']);
     $response = $cr->getOutput();
     $expectedResponse = ['errorReport' => ['message' => 'Error message', 'description' => 'Error desc', 'code' => '555', 'errors' => [['ref' => 'testing']]]];
     $this->assertSame($expectedResponse, $response);
 }