Flugg\Responder\Traits\MakesApiRequests::seeError PHP Méthode

seeError() protected méthode

Assert that the response is a valid error response.
protected seeError ( string $error, integer $status = null )
$error string
$status integer
    protected function seeError(string $error, int $status = null)
    {
        if (!is_null($status)) {
            $this->seeStatusCode($status);
        }
        if ($this->app->config->get('responder.status_code')) {
            $this->seeJson(['status' => $status]);
        }
        return $this->seeJson(['success' => false])->seeJsonSubset(['error' => ['code' => $error]]);
    }