coldbox.system.testing.mock.web

Class MockController

WEB-INF.cftags.component
        extended by coldbox.system.web.Controller
            extended by coldbox.system.testing.mock.web.MockController
Class Attributes:
  • output : false
  •  

    This is the ColdBox Unit Test Front Controller.

    Constructor Summary
    init(string appRootPath, any appKey)
          Constructor.
    Method Summary
    void relocate(string url, [boolean addtoken='false'], [boolean postProcessExempt='false'])
         Facade for cflocation.
    void setNextEvent([string event='[runtime expression]'], [string queryString=''], [boolean addToken='false'], [string persist=''], [struct persistStruct='[runtime expression]'], [boolean ssl], [string baseURL=''], [boolean postProcessExempt='false'], [string URL], [string URI], [numeric statusCode='0'])
         I Set the next event to run and relocate the browser to that event.
    void setNextRoute(string route, [string persist=''], [struct persistStruct='[runtime expression]'], [boolean addToken='false'], [boolean ssl='false'], [string queryString=''], [boolean postProcessExempt='false'])
         I Set the next ses route to relocate to.
     
    Methods inherited from class coldbox.system.web.Controller
    getAppHash, getAppKey, getAppRootPath, getAspectsInitiated, getCFMLEngine, getCacheBox, getColdboxInitiated, getColdboxOCM, getColdboxSettings, getConfigSettings, getDebuggerService, getExceptionService, getHandlerService, getInterceptorService, getLoaderService, getLogBox, getMemento, getModuleService, getPlugin, getPluginService, getRequestService, getServices, getSetting, getSettingStructure, getUtil, getValidationManager, getWireBox, invoker, persistVariables, pushTimers, runEvent, sendRelocation, setAppHash, setAppRootPath, setAspectsInitiated, setCacheBox, setColdboxInitiated, setColdboxOCM, setColdboxSettings, setConfigSettings, setDebuggerService, setHandlerService, setInterceptorService, setLoaderService, setLog, setLogBox, setModuleService, setPluginService, setRequestService, setSetting, setValidationManager, setWireBox, settingExists, updateSSL, validateAction
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init(string appRootPath, any appKey)

    Constructor

    Parameters:
    appRootPath - The app Root Path
    appKey - The application registered application key

    Method Detail

    relocate

    public void relocate(string url, [boolean addtoken='false'], [boolean postProcessExempt='false'])

    Facade for cflocation

    Parameters:
    url
    addtoken
    postProcessExempt - Do not fire the postProcess interceptors

    setNextEvent

    Public void setNextEvent([string event='[runtime expression]'], [string queryString=''], [boolean addToken='false'], [string persist=''], [struct persistStruct='[runtime expression]'], [boolean ssl], [string baseURL=''], [boolean postProcessExempt='false'], [string URL], [string URI], [numeric statusCode='0'])

    I Set the next event to run and relocate the browser to that event.

    Overrides:
    setNextEvent in class Controller
    Parameters:
    event - The name of the event to run, if not passed, then it will use the default event found in your configuration file.
    queryString - The query string to append, if needed. If in SES mode it will be translated to convention name value pairs
    addToken - Wether to add the tokens or not. Default is false
    persist - What request collection keys to persist in flash ram
    persistStruct - A structure key-value pairs to persist in flash ram.
    ssl - Whether to relocate in SSL or not. You need to explicitly say TRUE or FALSE if going out from SSL. If none passed, we look at the even's SES base URL (if in SES mode)
    baseURL - Use this baseURL instead of the index.cfm that is used by default. You can use this for ssl or any full base url you would like to use. Ex: https://mysite.com/index.cfm
    postProcessExempt - Do not fire the postProcess interceptors
    URL - The full URL you would like to relocate to instead of an event: ex: URL='http://www.google.com'
    URI - The relative URI you would like to relocate to instead of an event: ex: URI='/mypath/awesome/here'
    statusCode - The status code to use in the relocation

    setNextRoute

    Public void setNextRoute(string route, [string persist=''], [struct persistStruct='[runtime expression]'], [boolean addToken='false'], [boolean ssl='false'], [string queryString=''], [boolean postProcessExempt='false'])

    I Set the next ses route to relocate to. This method pre-pends the baseURL

    Parameters:
    route - The route to relocate to, do not prepend the baseURL or /.
    persist - What request collection keys to persist in the relocation
    persistStruct - A structure key-value pairs to persist.
    addToken - Wether to add the tokens or not. Default is false
    ssl - Whether to relocate in SSL or not
    queryString - The query string to append, if needed.
    postProcessExempt - Do not fire the postProcess interceptors