Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Functional testing scaffold for MVC applications
Zend_Controller_Front $_frontController = ''
DetailsZend_Dom_Query $_query = ''
DetailsZend_Controller_Request_Abstract $_request = ''
DetailsZend_Controller_Response_Abstract $_response = ''
Detailsmixed $bootstrap = ''
Details__get(
mixed $name
)
:
voidOverloading for common properties
Provides overloading for request, response, and frontController objects.
Details__set(
string $name, mixed $value
)
:
voidOverloading: prevent overloading to special properties
Details_incrementAssertionCount(
)
:
voidIncrement assertion count
Details_resetPlaceholders(
)
:
voidRest all view placeholders
DetailsassertAction(
string $action, string $message
)
:
voidAssert that the last handled request used the given action
DetailsassertController(
string $controller, string $message
)
:
voidAssert that the last handled request used the given controller
DetailsassertHeader(
string $header, string $message
)
:
voidAssert response header exists
DetailsassertHeaderContains(
string $header, string $match, string $message
)
:
voidAssert response header exists and contains the given string
DetailsassertHeaderRegex(
string $header, string $pattern, string $message
)
:
voidAssert response header exists and matches the given pattern
DetailsassertModule(
string $module, string $message
)
:
voidAssert that the last handled request used the given module
DetailsassertNotAction(
string $action, string $message
)
:
voidAssert that the last handled request did NOT use the given action
DetailsassertNotController(
string $controller, string $message
)
:
voidAssert that the last handled request did NOT use the given controller
DetailsassertNotHeader(
string $header, string $message
)
:
voidAssert response header does not exist
DetailsassertNotHeaderContains(
string $header, string $match, string $message
)
:
voidAssert response header does not exist and/or does not contain the given string
DetailsassertNotHeaderRegex(
string $header, string $pattern, string $message
)
:
voidAssert response header does not exist and/or does not match the given regex
DetailsassertNotModule(
string $module, string $message
)
:
voidAssert that the last handled request did NOT use the given module
DetailsassertNotQuery(
string $path, string $message
)
:
voidAssert against DOM selection
DetailsassertNotQueryContentContains(
string $path, string $match, string $message
)
:
voidAssert against DOM selection; node should NOT contain content
DetailsassertNotQueryContentRegex(
string $path, string $pattern, string $message
)
:
voidAssert against DOM selection; node should NOT match content
DetailsassertNotQueryCount(
string $path, string $count, string $message
)
:
voidAssert against DOM selection; should NOT contain exact number of nodes
DetailsassertNotRedirect(
string $message
)
:
voidAssert that response is NOT a redirect
DetailsassertNotRedirectRegex(
string $pattern, string $message
)
:
voidAssert that redirect location does not match pattern
DetailsassertNotRedirectTo(
string $url, string $message
)
:
voidAssert that response does not redirect to given URL
DetailsassertNotResponseCode(
int $code, string $message
)
:
voidAssert response code
DetailsassertNotRoute(
string $route, string $message
)
:
voidAssert that the route matched is NOT as specified
DetailsassertNotXpath(
string $path, string $message
)
:
voidAssert against XPath selection
DetailsassertNotXpathContentContains(
string $path, string $match, string $message
)
:
voidAssert against XPath selection; node should NOT contain content
DetailsassertNotXpathContentRegex(
string $path, string $pattern, string $message
)
:
voidAssert against XPath selection; node should NOT match content
DetailsassertNotXpathCount(
string $path, string $count, string $message
)
:
voidAssert against XPath selection; should NOT contain exact number of nodes
DetailsassertQuery(
string $path, string $message
)
:
voidAssert against DOM selection
DetailsassertQueryContentContains(
string $path, string $match, string $message
)
:
voidAssert against DOM selection; node should contain content
DetailsassertQueryContentRegex(
string $path, string $pattern, string $message
)
:
voidAssert against DOM selection; node should match content
DetailsassertQueryCount(
string $path, string $count, string $message
)
:
voidAssert against DOM selection; should contain exact number of nodes
DetailsassertQueryCountMax(
string $path, string $count, string $message
)
:
voidAssert against DOM selection; should contain no more than this number of nodes
DetailsassertQueryCountMin(
string $path, string $count, string $message
)
:
voidAssert against DOM selection; should contain at least this number of nodes
DetailsassertRedirect(
string $message
)
:
voidAssert that response is a redirect
DetailsassertRedirectRegex(
string $pattern, string $message
)
:
voidAssert that redirect location matches pattern
DetailsassertRedirectTo(
string $url, string $message
)
:
voidAssert that response redirects to given URL
DetailsassertResponseCode(
int $code, string $message
)
:
voidAssert response code
DetailsassertRoute(
string $route, string $message
)
:
voidAssert that the specified route was used
DetailsassertXpath(
string $path, string $message
)
:
voidAssert against XPath selection
DetailsassertXpathContentContains(
string $path, string $match, string $message
)
:
voidAssert against XPath selection; node should contain content
DetailsassertXpathContentRegex(
string $path, string $pattern, string $message
)
:
voidAssert against XPath selection; node should match content
DetailsassertXpathCount(
string $path, string $count, string $message
)
:
voidAssert against XPath selection; should contain exact number of nodes
DetailsassertXpathCountMax(
string $path, string $count, string $message
)
:
voidAssert against XPath selection; should contain no more than this number of nodes
DetailsassertXpathCountMin(
string $path, string $count, string $message
)
:
voidAssert against XPath selection; should contain at least this number of nodes
Detailsbootstrap(
)
:
voidBootstrap the front controller
Resets the front controller, and then bootstraps it.
If {@link $bootstrap} is a callback, executes it; if it is a file, it include's it. When done, sets the test case request and response objects into the front controller.
Detailsdispatch(
string|null $url
=
null
)
:
voidDispatch the MVC
If a URL is provided, sets it as the request URI in the request object. Then sets test case request and response objects in front controller, disables throwing exceptions, and disables returning the response. Finally, dispatches the front controller.
DetailsgetFrontController(
)
:
Zend_Controller_FrontRetrieve front controller instance
DetailsgetQuery(
)
:
Zend_Dom_QueryRetrieve DOM query object
DetailsgetRequest(
)
:
Zend_Controller_Request_AbstractRetrieve test case request object
DetailsgetResponse(
)
:
Zend_Controller_Response_AbstractRetrieve test case response object
Detailsreset(
)
:
voidReset MVC state
Creates new request/response objects, resets the front controller instance, and resets the action helper broker.
DetailsresetRequest(
)
:
Zend_Test_PHPUnit_ControllerTestCaseReset the request object
Useful for test cases that need to test multiple trips to the server.
DetailsresetResponse(
)
:
Zend_Test_PHPUnit_ControllerTestCaseReset the response object
Useful for test cases that need to test multiple trips to the server.
DetailssetUp(
)
:
voidSet up MVC app
Calls {@link bootstrap()} by default
Details