Flugg\Responder\Tests\MakeErrorResponseTest::youCanMakeErrorResponsesUsingTrait PHP Method

youCanMakeErrorResponsesUsingTrait() public method

Test that you can generate error responses using the RespondsWithJson trait.
    public function youCanMakeErrorResponsesUsingTrait()
    {
        // Arrange...
        $controller = $this->createTestController();
        $responder = $this->mockResponder();
        // Expect...
        $responder->shouldReceive('error')->with('test_error', 400, 'Test error.')->once();
        // Act...
        (new $controller())->errorAction();
    }