311. Class

311.1. Zend\Test\PHPUnit\Controller\AbstractControllerTestCase

311.1.1. Methods

311.1.1.1. setUp

setUp()

Reset the application for isolation

311.1.1.2. getTraceError

getTraceError()

Get the trace error flag

Return type:boolean

311.1.1.3. setTraceError

setTraceError()

Set the trace error flag

Parameters:boolean
Return type:AbstractControllerTestCase

311.1.1.4. getUseConsoleRequest

getUseConsoleRequest()

Get the usage of the console router or not

Return type:boolean $boolean

311.1.1.5. setUseConsoleRequest

setUseConsoleRequest()

Set the usage of the console router or not

Parameters:boolean
Return type:AbstractControllerTestCase

311.1.1.6. getApplicationConfig

getApplicationConfig()

Get the application config

Return type:array the application config

311.1.1.7. setApplicationConfig

setApplicationConfig()

Set the application config

Parameters:array
Throws LogicException:
 

311.1.1.8. getApplication

getApplication()

Get the application object

Return type:ZendMvcApplicationInterface

311.1.1.9. getApplicationServiceLocator

getApplicationServiceLocator()

Get the service manager of the application object

Return type:ZendServiceManagerServiceManager

311.1.1.10. getRequest

getRequest()

Get the application request object

Return type:ZendStdlibRequestInterface

311.1.1.11. getResponse

getResponse()

Get the application response object

Return type:ResponseInterface

311.1.1.12. url

url()

Set the request URL

Parameters:string
Return type:AbstractControllerTestCase

311.1.1.13. dispatch

dispatch()

Dispatch the MVC with an URL Accept a HTTP (simulate a customer action) or console route.

The URL provided set the request URI in the request object.

Parameters:string
Throws Exception:
 

311.1.1.14. reset

reset()

Reset the request

Return type:AbstractControllerTestCase

311.1.1.15. triggerApplicationEvent

triggerApplicationEvent()

Trigger an application event

Parameters:string
Return type:ZendEventManagerResponseCollection

311.1.1.16. assertModulesLoaded

assertModulesLoaded()

Assert modules were loaded with the module manager

Parameters:array

311.1.1.17. assertNotModulesLoaded

assertNotModulesLoaded()

Assert modules were not loaded with the module manager

Parameters:array

311.1.1.18. getResponseStatusCode

getResponseStatusCode()

Retrieve the response status code

Return type:int

311.1.1.19. assertResponseStatusCode

assertResponseStatusCode()

Assert response status code

Parameters:int

311.1.1.20. assertNotResponseStatusCode

assertNotResponseStatusCode()

Assert not response status code

Parameters:int

311.1.1.21. assertApplicationException

assertApplicationException()

Assert the application exception and message

Parameters:
  • $type – exception type
  • $message – exception message

311.1.1.22. getControllerFullClassName

getControllerFullClassName()

Get the full current controller class name

Return type:string

311.1.1.23. assertModuleName

assertModuleName()

Assert that the application route match used the given module

Parameters:string

311.1.1.24. assertNotModuleName

assertNotModuleName()

Assert that the application route match used NOT the given module

Parameters:string

311.1.1.25. assertControllerClass

assertControllerClass()

Assert that the application route match used the given controller class

Parameters:string

311.1.1.26. assertNotControllerClass

assertNotControllerClass()

Assert that the application route match used NOT the given controller class

Parameters:string

311.1.1.27. assertControllerName

assertControllerName()

Assert that the application route match used the given controller name

Parameters:string

311.1.1.28. assertNotControllerName

assertNotControllerName()

Assert that the application route match used NOT the given controller name

Parameters:string

311.1.1.29. assertActionName

assertActionName()

Assert that the application route match used the given action

Parameters:string

311.1.1.30. assertNotActionName

assertNotActionName()

Assert that the application route match used NOT the given action

Parameters:string

311.1.1.31. assertMatchedRouteName

assertMatchedRouteName()

Assert that the application route match used the given route name

Parameters:string

311.1.1.32. assertNotMatchedRouteName

assertNotMatchedRouteName()

Assert that the application route match used NOT the given route name

Parameters:string