Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase
Synopsis
class AbstractHttpControllerTestCase
extends AbstractControllerTestCase
{
- // members
- protected bool $useConsoleRequest;
- protected array $xpathNamespaces;
- // Inherited members from AbstractControllerTestCase
- protected ApplicationInterface $application;
- protected array $applicationConfig;
- protected bool $useConsoleRequest;
- protected bool $usedConsoleBackup;
- protected bool $traceError;
- // methods
- protected HeaderInterface|false getResponseHeader()
- public void assertResponseReasonPhrase()
- public void assertHasResponseHeader()
- public void assertNotHasResponseHeader()
- public void assertResponseHeaderContains()
- public void assertNotResponseHeaderContains()
- public void assertResponseHeaderRegex()
- public void assertNotResponseHeaderRegex()
- public void assertRedirect()
- public void assertNotRedirect()
- public void assertRedirectTo()
- public void assertNotRedirectTo()
- public void assertRedirectRegex()
- public void assertNotRedirectRegex()
- public void registerXpathNamespaces()
- private NodeList query()
- private array xpathQuery()
- private int queryCount()
- private int xpathQueryCount()
- private void queryAssertion()
- public void assertQuery()
- public void assertXpathQuery()
- private void notQueryAssertion()
- public void assertNotQuery()
- public void assertNotXpathQuery()
- private void queryCountAssertion()
- public void assertQueryCount()
- public void assertXpathQueryCount()
- private void notQueryCountAssertion()
- public void assertNotQueryCount()
- public void assertNotXpathQueryCount()
- private void queryCountMinAssertion()
- public void assertQueryCountMin()
- public void assertXpathQueryCountMin()
- private void queryCountMaxAssertion()
- public void assertQueryCountMax()
- public void assertXpathQueryCountMax()
- private void queryContentContainsAssertion()
- public void assertQueryContentContains()
- public void assertXpathQueryContentContains()
- private void notQueryContentContainsAssertion()
- public void assertNotQueryContentContains()
- public void assertNotXpathQueryContentContains()
- private void queryContentRegexAssertion()
- public void assertQueryContentRegex()
- public void assertXpathQueryContentRegex()
- private void notQueryContentRegexAssertion()
- public void assertNotQueryContentRegex()
- public void assertNotXpathQueryContentRegex()
- // Inherited methods from AbstractControllerTestCase
- protected void setUp()
- protected void tearDown()
- public bool getTraceError()
- public AbstractControllerTestCase setTraceError()
- public bool getUseConsoleRequest()
- public AbstractControllerTestCase setUseConsoleRequest()
- public array getApplicationConfig()
- public AbstractControllerTestCase setApplicationConfig()
- public ApplicationInterface getApplication()
- public ServiceManager getApplicationServiceLocator()
- public RequestInterface getRequest()
- public ResponseInterface getResponse()
- public AbstractControllerTestCase url()
- public void dispatch()
- public AbstractControllerTestCase reset()
- public ResponseCollection triggerApplicationEvent()
- public void assertModulesLoaded()
- public void assertNotModulesLoaded()
- protected int getResponseStatusCode()
- public void assertResponseStatusCode()
- public void assertNotResponseStatusCode()
- public void assertApplicationException()
- protected string getControllerFullClassName()
- public void assertModuleName()
- public void assertNotModuleName()
- public void assertControllerClass()
- public void assertNotControllerClass()
- public void assertControllerName()
- public void assertNotControllerName()
- public void assertActionName()
- public void assertNotActionName()
- public void assertMatchedRouteName()
- public void assertNotMatchedRouteName()
- public void assertTemplateName()
- public void assertNotTemplateName()
- protected boolean searchTemplates()
Hierarchy
Members
protected
- $application — \Zend\Mvc\ApplicationInterface
- $applicationConfig — array
- $traceError
—
Zend\Test\PHPUnit\Controller\bool
Trace error when exception is throwed in application - $useConsoleRequest
—
Zend\Test\PHPUnit\Controller\bool
HTTP controller must not use the console request - $useConsoleRequest
—
Zend\Test\PHPUnit\Controller\bool
Flag to use console router or not - $usedConsoleBackup
—
Zend\Test\PHPUnit\Controller\bool
Flag console used before tests - $xpathNamespaces
—
array
XPath namespaces
Methods
private
- notQueryAssertion() — Assert against DOM/XPath selection
- notQueryContentContainsAssertion() — Assert against DOM/XPath selection; node should NOT contain content
- notQueryContentRegexAssertion() — Assert against DOM/XPath selection; node should NOT match content
- notQueryCountAssertion() — Assert against DOM/XPath selection; should NOT contain exact number of nodes
- query() — Execute a DOM/XPath query
- queryAssertion() — Assert against DOM/XPath selection
- queryContentContainsAssertion() — Assert against DOM/XPath selection; node should contain content
- queryContentRegexAssertion() — Assert against DOM/XPath selection; node should match content
- queryCount() — Count the dom query executed
- queryCountAssertion() — Assert against DOM/XPath selection; should contain exact number of nodes
- queryCountMaxAssertion() — Assert against DOM/XPath selection; should contain no more than this number of nodes
- queryCountMinAssertion() — Assert against DOM/XPath selection; should contain at least this number of nodes
- xpathQuery() — Execute a xpath query
- xpathQueryCount() — Count the dom query executed
protected
- getResponseHeader() — Get response header by key
public
- assertHasResponseHeader() — Assert response header exists
- assertNotHasResponseHeader() — Assert response header does not exist
- assertNotQuery() — Assert against DOM selection
- assertNotQueryContentContains() — Assert against DOM selection; node should NOT contain content
- assertNotQueryContentRegex() — Assert against DOM selection; node should NOT match content
- assertNotQueryCount() — Assert against DOM selection; should NOT contain exact number of nodes
- assertNotRedirect() — Assert that response is NOT a redirect
- assertNotRedirectRegex() — Assert that redirect location does not match pattern
- assertNotRedirectTo() — Assert that response does not redirect to given URL
- assertNotResponseHeaderContains() — Assert response header exists and contains the given string
- assertNotResponseHeaderRegex() — Assert response header does not exist and/or does not match the given regex
- assertNotXpathQuery() — Assert against XPath selection
- assertNotXpathQueryContentContains() — Assert against XPath selection; node should NOT contain content
- assertNotXpathQueryContentRegex() — Assert against XPath selection; node should NOT match content
- assertNotXpathQueryCount() — Assert against XPath selection; should NOT contain exact number of nodes
- assertQuery() — Assert against DOM selection
- assertQueryContentContains() — Assert against DOM selection; node should contain content
- assertQueryContentRegex() — Assert against DOM selection; node should match content
- assertQueryCount() — Assert against DOM selection; should contain exact number of nodes
- assertQueryCountMax() — Assert against DOM selection; should contain no more than this number of nodes
- assertQueryCountMin() — Assert against DOM selection; should contain at least this number of nodes
- assertRedirect() — Assert that response is a redirect
- assertRedirectRegex() — Assert that redirect location matches pattern
- assertRedirectTo() — Assert that response redirects to given URL
- assertResponseHeaderContains() — Assert response header exists and contains the given string
- assertResponseHeaderRegex() — Assert response header exists and matches the given pattern
- assertResponseReasonPhrase() — Assert response has the given reason phrase
- assertXpathQuery() — Assert against XPath selection
- assertXpathQueryContentContains() — Assert against XPath selection; node should contain content
- assertXpathQueryContentRegex() — Assert against XPath selection; node should match content
- assertXpathQueryCount() — Assert against XPath selection; should contain exact number of nodes
- assertXpathQueryCountMax() — Assert against XPath selection; should contain no more than this number of nodes
- assertXpathQueryCountMin() — Assert against XPath selection; should contain at least this number of nodes
- registerXpathNamespaces() — Register XPath namespaces
Inherited from Zend\Test\PHPUnit\Controller\AbstractControllerTestCase
protected
- getControllerFullClassName() — Get the full current controller class name
- getResponseStatusCode() — Retrieve the response status code
- searchTemplates() — Recursively search a view model and it's children for the given templateName
- setUp() — Reset the application for isolation
- tearDown() — Restore params
public
- assertActionName() — Assert that the application route match used the given action
- assertApplicationException() — Assert the application exception and message
- assertControllerClass() — Assert that the application route match used the given controller class
- assertControllerName() — Assert that the application route match used the given controller name
- assertMatchedRouteName() — Assert that the application route match used the given route name
- assertModuleName() — Assert that the application route match used the given module
- assertModulesLoaded() — Assert modules were loaded with the module manager
- assertNotActionName() — Assert that the application route match used NOT the given action
- assertNotControllerClass() — Assert that the application route match used NOT the given controller class
- assertNotControllerName() — Assert that the application route match used NOT the given controller name
- assertNotMatchedRouteName() — Assert that the application route match used NOT the given route name
- assertNotModuleName() — Assert that the application route match used NOT the given module
- assertNotModulesLoaded() — Assert modules were not loaded with the module manager
- assertNotResponseStatusCode() — Assert not response status code
- assertNotTemplateName() — Assert not template name Assert that a template was not used somewhere in the view model tree
- assertResponseStatusCode() — Assert response status code
- assertTemplateName() — Assert template name Assert that a template was used somewhere in the view model tree
- dispatch() — Dispatch the MVC with a URL Accept a HTTP (simulate a customer action) or console route.
- getApplication() — Get the application object
- getApplicationConfig() — Get the application config
- getApplicationServiceLocator() — Get the service manager of the application object
- getRequest() — Get the application request object
- getResponse() — Get the application response object
- getTraceError() — Get the trace error flag
- getUseConsoleRequest() — Get the usage of the console router or not
- reset() — Reset the request
- setApplicationConfig() — Set the application config
- setTraceError() — Set the trace error flag
- setUseConsoleRequest() — Set the usage of the console router or not
- triggerApplicationEvent() — Trigger an application event
- url() — Set the request URL