Return to v1.4.5 docs

controller()



Creates and returns a controller object with your own custom name and params. Used primarily for testing purposes.

Name Type Required Default Description
name string Yes Name of the controller to create.
params struct No [runtime expression] The params struct (combination of form and URL variables).
controller(name [, params ]) <cfset testController = controller("users", params)>