Flugg\Responder\Tests\Unit\ErrorResponseBuilderTest::respondMethodShouldReturnAJsonResponse PHP Method

respondMethodShouldReturnAJsonResponse() public method

Test that the [respond] method converts the error response into an instance of [\Illuminate\Http\JsonResponse] with a default status code of 500.
    public function respondMethodShouldReturnAJsonResponse()
    {
        // Arrange...
        $responseBuilder = $this->app->make('responder.error');
        // Act...
        $response = $responseBuilder->respond();
        // Assert...
        $this->assertInstanceOf(JsonResponse::class, $response);
        $this->assertEquals($response->status(), 500);
    }