Class AbstractHttpControllerTestCase

Summary

Fully Qualified Name: Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase
Extends: AbstractControllerTestCase

Description

Methods

Name Description Defined By
assertActionName() Assert that the application route match used the given action AbstractControllerTestCase
assertApplicationException() Assert the application exception and message AbstractControllerTestCase
assertControllerClass() Assert that the application route match used the given controller class AbstractControllerTestCase
assertControllerName() Assert that the application route match used the given controller name AbstractControllerTestCase
assertHasResponseHeader() Assert response header exists AbstractHttpControllerTestCase
assertMatchedRouteName() Assert that the application route match used the given route name AbstractControllerTestCase
assertModuleName() Assert that the application route match used the given module AbstractControllerTestCase
assertModulesLoaded() Assert modules were loaded with the module manager AbstractControllerTestCase
assertNoMatchedRoute() Assert that the application did not match any route AbstractControllerTestCase
assertNotActionName() Assert that the application route match used NOT the given action AbstractControllerTestCase
assertNotControllerClass() Assert that the application route match used NOT the given controller class AbstractControllerTestCase
assertNotControllerName() Assert that the application route match used NOT the given controller name AbstractControllerTestCase
assertNotHasResponseHeader() Assert response header does not exist AbstractHttpControllerTestCase
assertNotMatchedRouteName() Assert that the application route match used NOT the given route name AbstractControllerTestCase
assertNotModuleName() Assert that the application route match used NOT the given module AbstractControllerTestCase
assertNotModulesLoaded() Assert modules were not loaded with the module manager AbstractControllerTestCase
assertNotQuery() Assert against DOM selection AbstractHttpControllerTestCase
assertNotQueryContentContains() Assert against DOM selection; node should NOT contain content AbstractHttpControllerTestCase
assertNotQueryContentRegex() Assert against DOM selection; node should NOT match content AbstractHttpControllerTestCase
assertNotQueryCount() Assert against DOM selection; should NOT contain exact number of nodes AbstractHttpControllerTestCase
assertNotRedirect() Assert that response is NOT a redirect AbstractHttpControllerTestCase
assertNotRedirectRegex() Assert that redirect location does not match pattern AbstractHttpControllerTestCase
assertNotRedirectTo() Assert that response does not redirect to given URL AbstractHttpControllerTestCase
assertNotResponseHeaderContains() Assert response header exists and contains the given string AbstractHttpControllerTestCase
assertNotResponseHeaderRegex() Assert response header does not exist and/or does not match the given regex AbstractHttpControllerTestCase
assertNotResponseStatusCode() Assert not response status code AbstractControllerTestCase
assertNotTemplateName() Assert not template name Assert that a template was not used somewhere in the view model tree AbstractControllerTestCase
assertNotXpathQuery() Assert against XPath selection AbstractHttpControllerTestCase
assertNotXpathQueryContentContains() Assert against XPath selection; node should NOT contain content AbstractHttpControllerTestCase
assertNotXpathQueryContentRegex() Assert against XPath selection; node should NOT match content AbstractHttpControllerTestCase
assertNotXpathQueryCount() Assert against XPath selection; should NOT contain exact number of nodes AbstractHttpControllerTestCase
assertQuery() Assert against DOM selection AbstractHttpControllerTestCase
assertQueryContentContains() Assert against DOM selection; node should contain content AbstractHttpControllerTestCase
assertQueryContentRegex() Assert against DOM selection; node should match content AbstractHttpControllerTestCase
assertQueryCount() Assert against DOM selection; should contain exact number of nodes AbstractHttpControllerTestCase
assertQueryCountMax() Assert against DOM selection; should contain no more than this number of nodes AbstractHttpControllerTestCase
assertQueryCountMin() Assert against DOM selection; should contain at least this number of nodes AbstractHttpControllerTestCase
assertRedirect() Assert that response is a redirect AbstractHttpControllerTestCase
assertRedirectRegex() Assert that redirect location matches pattern AbstractHttpControllerTestCase
assertRedirectTo() Assert that response redirects to given URL AbstractHttpControllerTestCase
assertResponseHeaderContains() Assert response header exists and contains the given string AbstractHttpControllerTestCase
assertResponseHeaderRegex() Assert response header exists and matches the given pattern AbstractHttpControllerTestCase
assertResponseReasonPhrase() Assert response has the given reason phrase AbstractHttpControllerTestCase
assertResponseStatusCode() Assert response status code AbstractControllerTestCase
assertTemplateName() Assert template name Assert that a template was used somewhere in the view model tree AbstractControllerTestCase
assertXpathQuery() Assert against XPath selection AbstractHttpControllerTestCase
assertXpathQueryContentContains() Assert against XPath selection; node should contain content AbstractHttpControllerTestCase
assertXpathQueryContentRegex() Assert against XPath selection; node should match content AbstractHttpControllerTestCase
assertXpathQueryCount() Assert against XPath selection; should contain exact number of nodes AbstractHttpControllerTestCase
assertXpathQueryCountMax() Assert against XPath selection; should contain no more than this number of nodes AbstractHttpControllerTestCase
assertXpathQueryCountMin() Assert against XPath selection; should contain at least this number of nodes AbstractHttpControllerTestCase
dispatch() Dispatch the MVC with a URL Accept a HTTP (simulate a customer action) or console route. AbstractControllerTestCase
getApplication() Get the application object AbstractControllerTestCase
getApplicationConfig() Get the application config AbstractControllerTestCase
getApplicationServiceLocator() Get the service manager of the application object AbstractControllerTestCase
getRequest() Get the application request object AbstractControllerTestCase
getResponse() Get the application response object AbstractControllerTestCase
getTraceError() Get the trace error flag AbstractControllerTestCase
getUseConsoleRequest() Get the usage of the console router or not AbstractControllerTestCase
registerXpathNamespaces() Register XPath namespaces AbstractHttpControllerTestCase
reset() Reset the request AbstractControllerTestCase
setApplicationConfig() Set the application config AbstractControllerTestCase
setTraceError() Set the trace error flag AbstractControllerTestCase
setUseConsoleRequest() Set the usage of the console router or not AbstractControllerTestCase
triggerApplicationEvent() Trigger an application event AbstractControllerTestCase
url() Set the request URL AbstractControllerTestCase

Method Details

assertActionName()

Assert that the application route match used the given action

Parameter Name Type Description
$action string

Returns:

assertApplicationException()

Assert the application exception and message

Parameter Name Type Description
application $message exception
$type
$message

Returns:

assertControllerClass()

Assert that the application route match used the given controller class

Parameter Name Type Description
$controller string

Returns:

assertControllerName()

Assert that the application route match used the given controller name

Parameter Name Type Description
$controller string

Returns:

assertHasResponseHeader()

Assert response header exists

Parameter Name Type Description
$header string

Returns:

assertMatchedRouteName()

Assert that the application route match used the given route name

Parameter Name Type Description
$route string

Returns:

assertModuleName()

Assert that the application route match used the given module

Parameter Name Type Description
$module string

Returns:

assertModulesLoaded()

Assert modules were loaded with the module manager

Parameter Name Type Description
$modules array

Returns:

assertNoMatchedRoute()

Assert that the application did not match any route

Returns:

assertNotActionName()

Assert that the application route match used NOT the given action

Parameter Name Type Description
$action string

Returns:

assertNotControllerClass()

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

Parameter Name Type Description
$controller string

Returns:

assertNotControllerName()

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

Parameter Name Type Description
$controller string

Returns:

assertNotHasResponseHeader()

Assert response header does not exist

Parameter Name Type Description
$header string

Returns:

assertNotMatchedRouteName()

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

Parameter Name Type Description
$route string

Returns:

assertNotModuleName()

Assert that the application route match used NOT the given module

Parameter Name Type Description
$module string

Returns:

assertNotModulesLoaded()

Assert modules were not loaded with the module manager

Parameter Name Type Description
$modules array

Returns:

assertNotQuery()

Assert against DOM selection

Parameter Name Type Description
$path string CSS

Returns:

assertNotQueryContentContains()

Assert against DOM selection; node should NOT contain content

Parameter Name Type Description
$path string CSS
$match string content

Returns:

assertNotQueryContentRegex()

Assert against DOM selection; node should NOT match content

Parameter Name Type Description
$path string CSS
$pattern string pattern

Returns:

assertNotQueryCount()

Assert against DOM selection; should NOT contain exact number of nodes

Parameter Name Type Description
$path string CSS
$count string Number

Returns:

assertNotRedirect()

Assert that response is NOT a redirect

Returns:

assertNotRedirectRegex()

Assert that redirect location does not match pattern

Parameter Name Type Description
$pattern string

Returns:

assertNotRedirectTo()

Assert that response does not redirect to given URL

Parameter Name Type Description
$url string

Returns:

assertNotResponseHeaderContains()

Assert response header exists and contains the given string

Parameter Name Type Description
$header string
$match string

Returns:

assertNotResponseHeaderRegex()

Assert response header does not exist and/or does not match the given regex

Parameter Name Type Description
$header string
$pattern string

Returns:

assertNotResponseStatusCode()

Assert not response status code

Parameter Name Type Description
$code int

Returns:

assertNotTemplateName()

Assert not template name Assert that a template was not used somewhere in the view model tree

Parameter Name Type Description
$templateName string

Returns:

assertNotXpathQuery()

Assert against XPath selection

Parameter Name Type Description
$path string XPath

Returns:

assertNotXpathQueryContentContains()

Assert against XPath selection; node should NOT contain content

Parameter Name Type Description
$path string XPath
$match string content

Returns:

assertNotXpathQueryContentRegex()

Assert against XPath selection; node should NOT match content

Parameter Name Type Description
$path string XPath
$pattern string pattern

Returns:

assertNotXpathQueryCount()

Assert against XPath selection; should NOT contain exact number of nodes

Parameter Name Type Description
$path string XPath
$count string Number

Returns:

assertQuery()

Assert against DOM selection

Parameter Name Type Description
$path string CSS

Returns:

assertQueryContentContains()

Assert against DOM selection; node should contain content

Parameter Name Type Description
$path string CSS
$match string content

Returns:

assertQueryContentRegex()

Assert against DOM selection; node should match content

Parameter Name Type Description
$path string CSS
$pattern string Pattern

Returns:

assertQueryCount()

Assert against DOM selection; should contain exact number of nodes

Parameter Name Type Description
$path string CSS
$count string Number

Returns:

assertQueryCountMax()

Assert against DOM selection; should contain no more than this number of nodes

Parameter Name Type Description
$path string CSS
$count string Maximum

Returns:

assertQueryCountMin()

Assert against DOM selection; should contain at least this number of nodes

Parameter Name Type Description
$path string CSS
$count string Minimum

Returns:

assertRedirect()

Assert that response is a redirect

Returns:

assertRedirectRegex()

Assert that redirect location matches pattern

Parameter Name Type Description
$pattern string

Returns:

assertRedirectTo()

Assert that response redirects to given URL

Parameter Name Type Description
$url string

Returns:

assertResponseHeaderContains()

Assert response header exists and contains the given string

Parameter Name Type Description
$header string
$match string

Returns:

assertResponseHeaderRegex()

Assert response header exists and matches the given pattern

Parameter Name Type Description
$header string
$pattern string

Returns:

assertResponseReasonPhrase()

Assert response has the given reason phrase

Parameter Name Type Description
$phrase string

Returns:

assertResponseStatusCode()

Assert response status code

Parameter Name Type Description
$code int

Returns:

assertTemplateName()

Assert template name Assert that a template was used somewhere in the view model tree

Parameter Name Type Description
$templateName string

Returns:

assertXpathQuery()

Assert against XPath selection

Parameter Name Type Description
$path string XPath

Returns:

assertXpathQueryContentContains()

Assert against XPath selection; node should contain content

Parameter Name Type Description
$path string XPath
$match string content

Returns:

assertXpathQueryContentRegex()

Assert against XPath selection; node should match content

Parameter Name Type Description
$path string XPath
$pattern string Pattern

Returns:

assertXpathQueryCount()

Assert against XPath selection; should contain exact number of nodes

Parameter Name Type Description
$path string XPath
$count string Number

Returns:

assertXpathQueryCountMax()

Assert against XPath selection; should contain no more than this number of nodes

Parameter Name Type Description
$path string XPath
$count string Maximum

Returns:

assertXpathQueryCountMin()

Assert against XPath selection; should contain at least this number of nodes

Parameter Name Type Description
$path string XPath
$count string Minimum

Returns:

dispatch()

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

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

Parameter Name Type Description
$url string
$method string|null
$params array|null
$isXmlHttpRequest

Returns:

getApplication()

Get the application object

Returns: \Zend\Mvc\ApplicationInterface

getApplicationConfig()

Get the application config

Returns: array the application config

getApplicationServiceLocator()

Get the service manager of the application object

Returns: \Zend\ServiceManager\ServiceManager

getRequest()

Get the application request object

Returns: \Zend\Stdlib\RequestInterface

getResponse()

Get the application response object

Returns: \ResponseInterface

getTraceError()

Get the trace error flag

Returns: bool

getUseConsoleRequest()

Get the usage of the console router or not

Returns: bool $boolean

registerXpathNamespaces()

Register XPath namespaces

Parameter Name Type Description
$xpathNamespaces array

Returns:

reset()

Reset the request

Parameter Name Type Description
$keepPersistence

Returns: \AbstractControllerTestCase

setApplicationConfig()

Set the application config

Parameter Name Type Description
$applicationConfig array

Returns: \AbstractControllerTestCase

setTraceError()

Set the trace error flag

Parameter Name Type Description
$traceError bool

Returns: \AbstractControllerTestCase

setUseConsoleRequest()

Set the usage of the console router or not

Parameter Name Type Description
$boolean bool

Returns: \AbstractControllerTestCase

triggerApplicationEvent()

Trigger an application event

Parameter Name Type Description
$eventName string

Returns: \Zend\EventManager\ResponseCollection

url()

Set the request URL

Parameter Name Type Description
$url string
$method string|null
$params array|null

Returns: \AbstractControllerTestCase

Top