Просмотр исходного кода

Fixes DocBlocks in Zend_Test_PHPUnit

Frank Brückner 11 лет назад
Родитель
Сommit
02072de7e6

+ 123 - 166
library/Zend/Test/PHPUnit/ControllerTestCase.php

@@ -81,8 +81,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      * Overloading: prevent overloading to special properties
      *
      * @param  string $name
-     * @param  mixed $value
-     * @return void
+     * @param  mixed  $value
+     * @throws Zend_Exception
      */
     public function __set($name, $value)
     {
@@ -98,8 +98,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      *
      * Provides overloading for request, response, and frontController objects.
      *
-     * @param mixed $name
-     * @return void
+     * @param  mixed $name
+     * @return null|Zend_Controller_Front|Zend_Controller_Request_HttpTestCase|Zend_Controller_Response_HttpTestCase
      */
     public function __get($name)
     {
@@ -119,8 +119,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      * Set up MVC app
      *
      * Calls {@link bootstrap()} by default
-     *
-     * @return void
      */
     protected function setUp()
     {
@@ -135,8 +133,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      * 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()
     {
@@ -167,8 +163,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      * disables throwing exceptions, and disables returning the response.
      * Finally, dispatches the front controller.
      *
-     * @param  string|null $url
-     * @return void
+     * @param string|null $url
      */
     public function dispatch($url = null)
     {
@@ -207,7 +202,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      * instance, and resets the action helper broker.
      *
      * @todo   Need to update Zend_Layout to add a resetInstance() method
-     * @return void
      */
     public function reset()
     {
@@ -225,8 +219,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
 
     /**
      * Rest all view placeholders
-     *
-     * @return void
      */
     protected function _resetPlaceholders()
     {
@@ -277,9 +269,8 @@ 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
+     * @param string $path CSS selector path
+     * @param string $message
      */
     public function assertQuery($path, $message = '')
     {
@@ -295,9 +286,8 @@ 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
+     * @param string $path CSS selector path
+     * @param string $message
      */
     public function assertNotQuery($path, $message = '')
     {
@@ -313,10 +303,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $match content that should be contained in matched nodes
+     * @param string $message
      */
     public function assertQueryContentContains($path, $match, $message = '')
     {
@@ -332,10 +321,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $match content that should NOT be contained in matched nodes
+     * @param string $message
      */
     public function assertNotQueryContentContains($path, $match, $message = '')
     {
@@ -351,10 +339,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $pattern Pattern that should be contained in matched nodes
+     * @param string $message
      */
     public function assertQueryContentRegex($path, $pattern, $message = '')
     {
@@ -370,10 +357,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $pattern pattern that should NOT be contained in matched nodes
+     * @param string $message
      */
     public function assertNotQueryContentRegex($path, $pattern, $message = '')
     {
@@ -389,10 +375,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $count Number of nodes that should match
+     * @param string $message
      */
     public function assertQueryCount($path, $count, $message = '')
     {
@@ -408,10 +393,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $count Number of nodes that should NOT match
+     * @param string $message
      */
     public function assertNotQueryCount($path, $count, $message = '')
     {
@@ -427,10 +411,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $count Minimum number of nodes that should match
+     * @param string $message
      */
     public function assertQueryCountMin($path, $count, $message = '')
     {
@@ -446,10 +429,9 @@ 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
-     * @return void
+     * @param string $path CSS selector path
+     * @param string $count Maximum number of nodes that should match
+     * @param string $message
      */
     public function assertQueryCountMax($path, $count, $message = '')
     {
@@ -465,8 +447,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Register XPath namespaces
      *
-     * @param   array $xpathNamespaces
-     * @return  void
+     * @param array $xpathNamespaces
      */
     public function registerXpathNamespaces($xpathNamespaces)
     {
@@ -476,9 +457,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert against XPath selection
      *
-     * @param  string $path XPath path
-     * @param  string $message
-     * @return void
+     * @param string $path XPath path
+     * @param string $message
      */
     public function assertXpath($path, $message = '')
     {
@@ -495,9 +475,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert against XPath selection
      *
-     * @param  string $path XPath path
-     * @param  string $message
-     * @return void
+     * @param string $path XPath path
+     * @param string $message
      */
     public function assertNotXpath($path, $message = '')
     {
@@ -514,10 +493,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $match content that should be contained in matched nodes
+     * @param string $message
      */
     public function assertXpathContentContains($path, $match, $message = '')
     {
@@ -534,10 +512,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $match content that should NOT be contained in matched nodes
+     * @param string $message
      */
     public function assertNotXpathContentContains($path, $match, $message = '')
     {
@@ -554,10 +531,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $pattern Pattern that should be contained in matched nodes
+     * @param string $message
      */
     public function assertXpathContentRegex($path, $pattern, $message = '')
     {
@@ -574,10 +550,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $pattern pattern that should NOT be contained in matched nodes
+     * @param string $message
      */
     public function assertNotXpathContentRegex($path, $pattern, $message = '')
     {
@@ -594,10 +569,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $count Number of nodes that should match
+     * @param string $message
      */
     public function assertXpathCount($path, $count, $message = '')
     {
@@ -614,10 +588,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $count Number of nodes that should NOT match
+     * @param string $message
      */
     public function assertNotXpathCount($path, $count, $message = '')
     {
@@ -634,10 +607,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $count Minimum number of nodes that should match
+     * @param string $message
      */
     public function assertXpathCountMin($path, $count, $message = '')
     {
@@ -654,10 +626,9 @@ 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
-     * @return void
+     * @param string $path XPath path
+     * @param string $count Maximum number of nodes that should match
+     * @param string $message
      */
     public function assertXpathCountMax($path, $count, $message = '')
     {
@@ -674,8 +645,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that response is a redirect
      *
-     * @param  string $message
-     * @return void
+     * @param string $message
      */
     public function assertRedirect($message = '')
     {
@@ -691,8 +661,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that response is NOT a redirect
      *
-     * @param  string $message
-     * @return void
+     * @param string $message
      */
     public function assertNotRedirect($message = '')
     {
@@ -708,9 +677,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that response redirects to given URL
      *
-     * @param  string $url
-     * @param  string $message
-     * @return void
+     * @param string $url
+     * @param string $message
      */
     public function assertRedirectTo($url, $message = '')
     {
@@ -726,9 +694,8 @@ 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
-     * @return void
+     * @param string $url
+     * @param string $message
      */
     public function assertNotRedirectTo($url, $message = '')
     {
@@ -744,9 +711,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that redirect location matches pattern
      *
-     * @param  string $pattern
-     * @param  string $message
-     * @return void
+     * @param string $pattern
+     * @param string $message
      */
     public function assertRedirectRegex($pattern, $message = '')
     {
@@ -762,9 +728,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that redirect location does not match pattern
      *
-     * @param  string $pattern
-     * @param  string $message
-     * @return void
+     * @param string $pattern
+     * @param string $message
      */
     public function assertNotRedirectRegex($pattern, $message = '')
     {
@@ -780,9 +745,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert response code
      *
-     * @param  int $code
-     * @param  string $message
-     * @return void
+     * @param int $code
+     * @param string $message
      */
     public function assertResponseCode($code, $message = '')
     {
@@ -798,9 +762,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert response code
      *
-     * @param  int $code
-     * @param  string $message
-     * @return void
+     * @param int $code
+     * @param string $message
      */
     public function assertNotResponseCode($code, $message = '')
     {
@@ -817,9 +780,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert response header exists
      *
-     * @param  string $header
-     * @param  string $message
-     * @return void
+     * @param string $header
+     * @param string $message
      */
     public function assertHeader($header, $message = '')
     {
@@ -835,9 +797,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert response header does not exist
      *
-     * @param  string $header
-     * @param  string $message
-     * @return void
+     * @param string $header
+     * @param string $message
      */
     public function assertNotHeader($header, $message = '')
     {
@@ -854,10 +815,9 @@ 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
-     * @return void
+     * @param string $header
+     * @param string $match
+     * @param string $message
      */
     public function assertHeaderContains($header, $match, $message = '')
     {
@@ -873,10 +833,9 @@ 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 $match
-     * @param  string $message
-     * @return void
+     * @param string $header
+     * @param string $match
+     * @param string $message
      */
     public function assertNotHeaderContains($header, $match, $message = '')
     {
@@ -893,10 +852,9 @@ 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
-     * @return void
+     * @param string $header
+     * @param string $pattern
+     * @param string $message
      */
     public function assertHeaderRegex($header, $pattern, $message = '')
     {
@@ -912,10 +870,9 @@ 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 $pattern
-     * @param  string $message
-     * @return void
+     * @param string $header
+     * @param string $pattern
+     * @param string $message
      */
     public function assertNotHeaderRegex($header, $pattern, $message = '')
     {
@@ -932,9 +889,8 @@ 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
-     * @return void
+     * @param string $module
+     * @param string $message
      */
     public function assertModule($module, $message = '')
     {
@@ -954,9 +910,8 @@ 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
-     * @return void
+     * @param string $module
+     * @param string $message
      */
     public function assertNotModule($module, $message = '')
     {
@@ -973,9 +928,8 @@ 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
-     * @return void
+     * @param string $controller
+     * @param string $message
      */
     public function assertController($controller, $message = '')
     {
@@ -997,7 +951,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
      *
      * @param  string $controller
      * @param  string $message
-     * @return void
      */
     public function assertNotController($controller, $message = '')
     {
@@ -1017,9 +970,8 @@ 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
-     * @return void
+     * @param string $action
+     * @param string $message
      */
     public function assertAction($action, $message = '')
     {
@@ -1036,9 +988,8 @@ 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
-     * @return void
+     * @param string $action
+     * @param string $message
      */
     public function assertNotAction($action, $message = '')
     {
@@ -1055,9 +1006,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
     /**
      * Assert that the specified route was used
      *
-     * @param  string $route
-     * @param  string $message
-     * @return void
+     * @param string $route
+     * @param string $message
      */
     public function assertRoute($route, $message = '')
     {
@@ -1078,9 +1028,8 @@ 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
-     * @return void
+     * @param string $route
+     * @param string $message
      */
     public function assertNotRoute($route, $message = '')
     {
@@ -1149,14 +1098,17 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
         }
         return $this->_query;
     }
-    
+
     /**
      * URL Helper
-     * 
-     * @param array $urlOptions
-     * @param string $name
-     * @param bool $reset
-     * @param bool $encode
+     *
+     * @param  array  $urlOptions
+     * @param  string $name
+     * @param  bool   $reset
+     * @param  bool   $encode
+     * @throws Exception
+     * @throws Zend_Controller_Router_Exception
+     * @return string
      */
     public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
     {
@@ -1170,7 +1122,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
         }
         return $router->assemble($urlOptions, $name, $reset, $encode);
     }
-    
+
+    /**
+     * Urlize options
+     *
+     * @param  array $urlOptions
+     * @param  bool  $actionControllerModuleOnly
+     * @return mixed
+     */
     public function urlizeOptions($urlOptions, $actionControllerModuleOnly = true)
     {
         $ccToDash = new Zend_Filter_Word_CamelCaseToDash();
@@ -1184,8 +1143,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
 
     /**
      * Increment assertion count
-     *
-     * @return void
      */
     protected function _incrementAssertionCount()
     {

+ 0 - 1
library/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php

@@ -48,7 +48,6 @@ class Zend_Test_PHPUnit_Db_DataSet_DbTableDataSet extends PHPUnit_Extensions_Dat
      * By default a select * will be done on the given tablename.
      *
      * @param Zend_Db_Table_Abstract $table
-     * @param string|Zend_Db_Select $query
      * @param string $where
      * @param string $order
      * @param string $count

+ 3 - 2
library/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php

@@ -35,9 +35,10 @@ class Zend_Test_PHPUnit_Db_DataSet_QueryTable extends PHPUnit_Extensions_Databas
     /**
      * Creates a new database query table object.
      *
-     * @param string $table_name
-     * @param string $query
+     * @param string                                             $tableName
+     * @param string                                             $query
      * @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection
+     * @throws Zend_Test_PHPUnit_Db_Exception
      */
     public function __construct($tableName, $query, PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection)
     {

+ 1 - 1
library/Zend/Test/PHPUnit/Db/Metadata/Generic.php

@@ -62,7 +62,7 @@ class Zend_Test_PHPUnit_Db_Metadata_Generic implements PHPUnit_Extensions_Databa
      * Creates a new database meta data object using the given pdo connection
      * and schema name.
      *
-     * @param PDO $pdo
+     * @param Zend_Db_Adapter_Abstract $db
      * @param string $schema
      */
     public final function __construct(Zend_Db_Adapter_Abstract $db, $schema)