ControllerTestCase Class Reference

Detailed Description

ControllerTestCase is the base class for test cases used for Controllers.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 22 of file ControllerTestCase.php.

+ Inheritance diagram for ControllerTestCase:

Protected Member Functions

 runRequest ($action, $data)
 
 getControllerName ()
 
- Protected Member Functions inherited from DatabaseTestCase
 setUp ()
 
 tearDown ()
 

Additional Inherited Members

- Public Member Functions inherited from DatabaseTestCase
 getConnection ()
 

Member Function Documentation

runRequest (   $action,
  $data 
)
protected

Make a request to the controller.

This method makes sure that the requested action is routed to the controller to be tested. The calling method has to make sure that a session is started, if necessary (e.g. by calling TestUtil::startSession()). The transaction will be rolled back before the request is run in order to avoid side effects.

Parameters
$actionThe action
$dataAn associative array with additional key/value pairs for the Request instance
Returns
Response instance

Definition at line 34 of file ControllerTestCase.php.

getControllerName ( )
abstractprotected

Get the fully qualified name of the controller to test.

Returns
The name of the controller