|
|
@@ -13,7 +13,7 @@
|
|
|
* to license@zend.com so we can send you a copy immediately.
|
|
|
*
|
|
|
* @category Zend
|
|
|
- * @package Zend_XX
|
|
|
+ * @package Zend_Test
|
|
|
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
|
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
|
|
* @version $Id$
|
|
|
@@ -42,7 +42,7 @@ require_once 'Zend/Registry.php';
|
|
|
|
|
|
/**
|
|
|
* Functional testing scaffold for MVC applications
|
|
|
- *
|
|
|
+ *
|
|
|
* @uses PHPUnit_Framework_TestCase
|
|
|
* @package Zend_Test
|
|
|
* @subpackage PHPUnit
|
|
|
@@ -70,7 +70,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
* @var Zend_Controller_Request_Abstract
|
|
|
*/
|
|
|
protected $_request;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @var Zend_Controller_Response_Abstract
|
|
|
*/
|
|
|
@@ -78,9 +78,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Overloading: prevent overloading to special properties
|
|
|
- *
|
|
|
- * @param string $name
|
|
|
- * @param mixed $value
|
|
|
+ *
|
|
|
+ * @param string $name
|
|
|
+ * @param mixed $value
|
|
|
* @return void
|
|
|
*/
|
|
|
public function __set($name, $value)
|
|
|
@@ -96,8 +96,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
* Overloading for common properties
|
|
|
*
|
|
|
* Provides overloading for request, response, and frontController objects.
|
|
|
- *
|
|
|
- * @param mixed $name
|
|
|
+ *
|
|
|
+ * @param mixed $name
|
|
|
* @return void
|
|
|
*/
|
|
|
public function __get($name)
|
|
|
@@ -118,7 +118,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
* Set up MVC app
|
|
|
*
|
|
|
* Calls {@link bootstrap()} by default
|
|
|
- *
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
protected function setUp()
|
|
|
@@ -131,10 +131,10 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
*
|
|
|
* 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
|
|
|
+ * 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.
|
|
|
- *
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
final public function bootstrap()
|
|
|
@@ -158,12 +158,12 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
/**
|
|
|
* Dispatch 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,
|
|
|
+ * 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.
|
|
|
- *
|
|
|
- * @param string|null $url
|
|
|
+ *
|
|
|
+ * @param string|null $url
|
|
|
* @return void
|
|
|
*/
|
|
|
public function dispatch($url = null)
|
|
|
@@ -192,8 +192,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Reset MVC state
|
|
|
- *
|
|
|
- * Creates new request/response objects, resets the front controller
|
|
|
+ *
|
|
|
+ * Creates new request/response objects, resets the front controller
|
|
|
* instance, and resets the action helper broker.
|
|
|
*
|
|
|
* @todo Need to update Zend_Layout to add a resetInstance() method
|
|
|
@@ -215,7 +215,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Rest all view placeholders
|
|
|
- *
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
protected function _resetPlaceholders()
|
|
|
@@ -237,7 +237,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
* Reset the request object
|
|
|
*
|
|
|
* Useful for test cases that need to test multiple trips to the server.
|
|
|
- *
|
|
|
+ *
|
|
|
* @return Zend_Test_PHPUnit_ControllerTestCase
|
|
|
*/
|
|
|
public function resetRequest()
|
|
|
@@ -250,7 +250,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
* Reset the response object
|
|
|
*
|
|
|
* Useful for test cases that need to test multiple trips to the server.
|
|
|
- *
|
|
|
+ *
|
|
|
* @return Zend_Test_PHPUnit_ControllerTestCase
|
|
|
*/
|
|
|
public function resetResponse()
|
|
|
@@ -262,7 +262,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $message
|
|
|
* @return void
|
|
|
@@ -280,7 +280,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $message
|
|
|
* @return void
|
|
|
@@ -298,7 +298,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; node should contain content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $match content that should be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -317,7 +317,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; node should NOT contain content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $match content that should NOT be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -336,7 +336,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; node should match content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $pattern Pattern that should be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -355,7 +355,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; node should NOT match content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $pattern pattern that should NOT be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -374,7 +374,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; should contain exact number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $count Number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -393,7 +393,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; should NOT contain exact number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $count Number of nodes that should NOT match
|
|
|
* @param string $message
|
|
|
@@ -412,7 +412,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; should contain at least this number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $count Minimum number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -431,7 +431,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against DOM selection; should contain no more than this number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path CSS selector path
|
|
|
* @param string $count Maximum number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -450,7 +450,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $message
|
|
|
* @return void
|
|
|
@@ -468,7 +468,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $message
|
|
|
* @return void
|
|
|
@@ -486,7 +486,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; node should contain content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $match content that should be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -505,7 +505,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; node should NOT contain content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $match content that should NOT be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -524,7 +524,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; node should match content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $pattern Pattern that should be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -543,7 +543,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; node should NOT match content
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $pattern pattern that should NOT be contained in matched nodes
|
|
|
* @param string $message
|
|
|
@@ -562,7 +562,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; should contain exact number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $count Number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -581,7 +581,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; should NOT contain exact number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $count Number of nodes that should NOT match
|
|
|
* @param string $message
|
|
|
@@ -600,7 +600,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; should contain at least this number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $count Minimum number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -619,7 +619,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert against XPath selection; should contain no more than this number of nodes
|
|
|
- *
|
|
|
+ *
|
|
|
* @param string $path XPath path
|
|
|
* @param string $count Maximum number of nodes that should match
|
|
|
* @param string $message
|
|
|
@@ -638,8 +638,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that response is a redirect
|
|
|
- *
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertRedirect($message = '')
|
|
|
@@ -655,8 +655,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that response is NOT a redirect
|
|
|
- *
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotRedirect($message = '')
|
|
|
@@ -672,9 +672,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that response redirects to given URL
|
|
|
- *
|
|
|
- * @param string $url
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $url
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertRedirectTo($url, $message = '')
|
|
|
@@ -690,9 +690,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that response does not redirect to given URL
|
|
|
- *
|
|
|
- * @param string $url
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $url
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotRedirectTo($url, $message = '')
|
|
|
@@ -708,9 +708,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that redirect location matches pattern
|
|
|
- *
|
|
|
- * @param string $pattern
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $pattern
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertRedirectRegex($pattern, $message = '')
|
|
|
@@ -726,9 +726,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that redirect location does not match pattern
|
|
|
- *
|
|
|
- * @param string $pattern
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $pattern
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotRedirectRegex($pattern, $message = '')
|
|
|
@@ -744,9 +744,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response code
|
|
|
- *
|
|
|
- * @param int $code
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param int $code
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertResponseCode($code, $message = '')
|
|
|
@@ -762,9 +762,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response code
|
|
|
- *
|
|
|
- * @param int $code
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param int $code
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotResponseCode($code, $message = '')
|
|
|
@@ -781,9 +781,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header exists
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertHeader($header, $message = '')
|
|
|
@@ -799,9 +799,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header does not exist
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotHeader($header, $message = '')
|
|
|
@@ -818,10 +818,10 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header exists and contains the given string
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
- * @param string $match
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
+ * @param string $match
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertHeaderContains($header, $match, $message = '')
|
|
|
@@ -837,10 +837,10 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header does not exist and/or does not contain the given string
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
* @param string $match
|
|
|
- * @param string $message
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotHeaderContains($header, $match, $message = '')
|
|
|
@@ -857,10 +857,10 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header exists and matches the given pattern
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
- * @param string $pattern
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
+ * @param string $pattern
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertHeaderRegex($header, $pattern, $message = '')
|
|
|
@@ -876,10 +876,10 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert response header does not exist and/or does not match the given regex
|
|
|
- *
|
|
|
- * @param string $header
|
|
|
+ *
|
|
|
+ * @param string $header
|
|
|
* @param string $pattern
|
|
|
- * @param string $message
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotHeaderRegex($header, $pattern, $message = '')
|
|
|
@@ -896,9 +896,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request used the given module
|
|
|
- *
|
|
|
- * @param string $module
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $module
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertModule($module, $message = '')
|
|
|
@@ -915,9 +915,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request did NOT use the given module
|
|
|
- *
|
|
|
- * @param string $module
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $module
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotModule($module, $message = '')
|
|
|
@@ -934,9 +934,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request used the given controller
|
|
|
- *
|
|
|
- * @param string $controller
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $controller
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertController($controller, $message = '')
|
|
|
@@ -953,9 +953,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request did NOT use the given controller
|
|
|
- *
|
|
|
- * @param string $controller
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $controller
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotController($controller, $message = '')
|
|
|
@@ -972,9 +972,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request used the given action
|
|
|
- *
|
|
|
- * @param string $action
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $action
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertAction($action, $message = '')
|
|
|
@@ -991,9 +991,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the last handled request did NOT use the given action
|
|
|
- *
|
|
|
- * @param string $action
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $action
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotAction($action, $message = '')
|
|
|
@@ -1010,9 +1010,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the specified route was used
|
|
|
- *
|
|
|
- * @param string $route
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $route
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertRoute($route, $message = '')
|
|
|
@@ -1030,9 +1030,9 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Assert that the route matched is NOT as specified
|
|
|
- *
|
|
|
- * @param string $route
|
|
|
- * @param string $message
|
|
|
+ *
|
|
|
+ * @param string $route
|
|
|
+ * @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
public function assertNotRoute($route, $message = '')
|
|
|
@@ -1050,7 +1050,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Retrieve front controller instance
|
|
|
- *
|
|
|
+ *
|
|
|
* @return Zend_Controller_Front
|
|
|
*/
|
|
|
public function getFrontController()
|
|
|
@@ -1063,7 +1063,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Retrieve test case request object
|
|
|
- *
|
|
|
+ *
|
|
|
* @return Zend_Controller_Request_Abstract
|
|
|
*/
|
|
|
public function getRequest()
|
|
|
@@ -1076,8 +1076,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Retrieve test case response object
|
|
|
- *
|
|
|
+ * Retrieve test case response object
|
|
|
+ *
|
|
|
* @return Zend_Controller_Response_Abstract
|
|
|
*/
|
|
|
public function getResponse()
|
|
|
@@ -1091,7 +1091,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Retrieve DOM query object
|
|
|
- *
|
|
|
+ *
|
|
|
* @return Zend_Dom_Query
|
|
|
*/
|
|
|
public function getQuery()
|
|
|
@@ -1105,14 +1105,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
|
|
|
|
|
|
/**
|
|
|
* Increment assertion count
|
|
|
- *
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
protected function _incrementAssertionCount()
|
|
|
{
|
|
|
$stack = debug_backtrace();
|
|
|
foreach (debug_backtrace() as $step) {
|
|
|
- if (isset($step['object'])
|
|
|
+ if (isset($step['object'])
|
|
|
&& $step['object'] instanceof PHPUnit_Framework_TestCase
|
|
|
) {
|
|
|
if (version_compare(PHPUnit_Runner_Version::id(), '3.3.3', 'lt')) {
|