seregazhuk\tests\helpers\ResponseHelper::apiShouldReturn PHP Method

apiShouldReturn() public method

public apiShouldReturn ( array | null $response = [], integer $times = 1, string $method = 'exec' )
$response array | null
$times integer
$method string
    public function apiShouldReturn($response = [], $times = 1, $method = 'exec')
    {
        $this->request->shouldReceive($method)->times($times)->andReturn(json_encode($response));
        return $this;
    }