Crud\Test\TestCase\Listener\ApiListenerTest::dataExceptionResponse PHP Method

dataExceptionResponse() public method

Data provider for testExceptionResponse
public dataExceptionResponse ( ) : array
return array
    public function dataExceptionResponse()
    {
        return ['default configuration' => [[], '\\Cake\\Network\\Exception\\BadRequestException', 'Unknown error', 0], 'change exception class' => [['class' => '\\Cake\\Core\\Exception\\Exception'], '\\Cake\\Core\\Exception\\Exception', 'Unknown error', 0], 'change exception code' => [['code' => 10], '\\Cake\\Network\\Exception\\BadRequestException', 'Unknown error', 10], 'change exception message' => [['message' => 'epic message'], '\\Cake\\Network\\Exception\\BadRequestException', 'epic message', 0], 'Validate case #1 - no validation errors' => [['class' => '\\Crud\\Error\\Exception\\ValidationException', 'type' => 'validate'], '\\Crud\\Error\\Exception\\ValidationException', '0 validation errors occurred', 422], 'Validate case #2 - one validation error' => [['class' => '\\Crud\\Error\\Exception\\ValidationException', 'type' => 'validate'], '\\Crud\\Error\\Exception\\ValidationException', 'A validation error occurred', 422, [['id' => 'hello world']]], 'Validate case #3 - two validation errors' => [['class' => '\\Crud\\Error\\Exception\\ValidationException', 'type' => 'validate'], '\\Crud\\Error\\Exception\\ValidationException', '2 validation errors occurred', 422, [['id' => 'hello world', 'name' => 'fail me']]]];
    }