DESCRIPTION

CatalystX::CRUD::Test::Controller is a mock controller class for testing CatalystX::CRUD packages. It implements the required Controller methods and overrides others to work with CatalystX::CRUD::Test::Form.

METHODS

form_to_object

The flow of this methods comes more or less verbatim from the RHTMLO controller.

Returns the object from stash() initialized with the form and request params.

form

Returns a new form_class object every time, initialized with form_fields.

end

If the stash() has an 'object' defined, serializes the object with serialize_object() and sticks it in the response body().

If there are any errors, replaces the normal Catalyst debug screen with contents of $c->error.

serialize_object( context, object )

Serializes object for response. Default is just to create hashref of key/value pairs and send through Data::Dump::dump().