Commit bd12b3a7 authored by Laurent's avatar Laurent
Browse files

Fix compatibility for phpunit 4.2.0

parent 84c22f0b
......@@ -46,8 +46,8 @@ class Zend_Controller_Action_Helper_Json extends Zend_Controller_Action_Helper_A
/**
* Create JSON response
*
* Encodes and returns data to JSON. Content-Type header set to
* 'application/json', and disables layouts and viewRenderer (if being
* Encodes and returns data to JSON. Content-Type header set to
* 'application/json', and disables layouts and viewRenderer (if being
* used).
*
* @param mixed $data
......@@ -77,9 +77,9 @@ class Zend_Controller_Action_Helper_Json extends Zend_Controller_Action_Helper_A
/**
* Encode JSON response and immediately send
*
* @param mixed $data
* @param boolean $keepLayouts
*
* @param mixed $data
* @param boolean $keepLayouts
* @return string|void
*/
public function sendJson($data, $keepLayouts = false)
......@@ -99,12 +99,12 @@ class Zend_Controller_Action_Helper_Json extends Zend_Controller_Action_Helper_A
/**
* Strategy pattern: call helper as helper broker method
*
* Allows encoding JSON. If $sendNow is true, immediately sends JSON
* response.
*
* @param mixed $data
* @param boolean $sendNow
* @param boolean $keepLayouts
* Allows encoding JSON. If $sendNow is true, immediately sends JSON
* response.
*
* @param mixed $data
* @param boolean $sendNow
* @param boolean $keepLayouts
* @return string|void
*/
public function direct($data, $sendNow = true, $keepLayouts = false)
......
......@@ -7,7 +7,7 @@ require_once 'Zend/Dom/Query.php';
/**
* Zend_Dom_Query-based PHPUnit Constraint
*
*
* @uses PHPUnit_Framework_Constraint
* @package Zend_Test
* @subpackage PHPUnit
......@@ -72,7 +72,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Constructor; setup constraint state
*
*
* @param string $path CSS selector path
* @return void
*/
......@@ -83,8 +83,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Indicate negative match
*
* @param bool $flag
*
* @param bool $flag
* @return void
*/
public function setNegate($flag = true)
......@@ -94,8 +94,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Whether or not path is a straight XPath expression
*
* @param bool $flag
*
* @param bool $flag
* @return Zend_Test_PHPUnit_Constraint_DomQuery
*/
public function setUseXpath($flag = true)
......@@ -106,7 +106,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Evaluate an object to see if it fits the constraints
*
*
* @param string $other String to examine
* @param null|string Assertion type
* @return bool
......@@ -179,15 +179,15 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Report Failure
*
*
* @see PHPUnit_Framework_Constraint for implementation details
* @param mixed $other CSS selector path
* @param string $description
* @param bool $not
* @param string $description
* @param bool $not
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
public function fail($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL)
{
$not = $comparisonFailure;
//public function fail($other, $description, $not = false)
......@@ -242,7 +242,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Complete implementation
*
*
* @return string
*/
public function toString()
......@@ -252,8 +252,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Check to see if content is matched in selected nodes
*
* @param Zend_Dom_Query_Result $result
*
* @param Zend_Dom_Query_Result $result
* @param string $match Content to match
* @return bool
*/
......@@ -275,9 +275,9 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Check to see if content is NOT matched in selected nodes
*
* @param Zend_Dom_Query_Result $result
* @param string $match
*
* @param Zend_Dom_Query_Result $result
* @param string $match
* @return bool
*/
protected function _notMatchContent($result, $match)
......@@ -298,8 +298,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Check to see if content is matched by regex in selected nodes
*
* @param Zend_Dom_Query_Result $result
*
* @param Zend_Dom_Query_Result $result
* @param string $pattern
* @return bool
*/
......@@ -321,8 +321,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Check to see if content is NOT matched by regex in selected nodes
*
* @param Zend_Dom_Query_Result $result
*
* @param Zend_Dom_Query_Result $result
* @param string $pattern
* @return bool
*/
......@@ -344,8 +344,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Determine if content count matches criteria
*
* @param Zend_Dom_Query_Result $result
*
* @param Zend_Dom_Query_Result $result
* @param int $test Value against which to test
* @param string $type assertion type
* @return boolean
......@@ -370,8 +370,8 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
/**
* Get node content, minus node markup tags
*
* @param DOMNode $node
*
* @param DOMNode $node
* @return string
*/
protected function _getNodeContent(DOMNode $node)
......
......@@ -4,7 +4,7 @@
/**
* Redirection constraints
*
*
* @uses PHPUnit_Framework_Constraint
* @package Zend_Test
* @subpackage PHPUnit
......@@ -51,7 +51,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Constructor; setup constraint state
*
*
* @return void
*/
public function __construct()
......@@ -60,8 +60,8 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Indicate negative match
*
* @param bool $flag
*
* @param bool $flag
* @return void
*/
public function setNegate($flag = true)
......@@ -71,7 +71,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Evaluate an object to see if it fits the constraints
*
*
* @param string $other String to examine
* @param null|string Assertion type
* @return bool
......@@ -129,15 +129,15 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Report Failure
*
*
* @see PHPUnit_Framework_Constraint for implementation details
* @param mixed $other
* @param mixed $other
* @param string $description Additional message to display
* @param bool $not
* @param bool $not
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
public function fail($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL)
{
//public function fail($other, $description, $not = false)
$not = $comparisonFailure;
......@@ -176,7 +176,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Complete implementation
*
*
* @return string
*/
public function toString()
......@@ -186,7 +186,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Check to see if content is matched in selected nodes
*
*
* @param Zend_Controller_Response_HttpTestCase $response
* @param string $match Content to match
* @return bool
......@@ -206,9 +206,9 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Check to see if content is NOT matched in selected nodes
*
*
* @param Zend_Controller_Response_HttpTestCase $response
* @param string $match
* @param string $match
* @return bool
*/
protected function _notMatch($response, $match)
......@@ -226,7 +226,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Check to see if content is matched by regex in selected nodes
*
*
* @param Zend_Controller_Response_HttpTestCase $response
* @param string $pattern
* @return bool
......@@ -246,7 +246,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
/**
* Check to see if content is NOT matched by regex in selected nodes
*
*
* @param Zend_Controller_Response_HttpTestCase $response
* @param string $pattern
* @return bool
......
......@@ -4,7 +4,7 @@
/**
* Response header PHPUnit Constraint
*
*
* @uses PHPUnit_Framework_Constraint
* @package Zend_Test
* @subpackage PHPUnit
......@@ -62,7 +62,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Constructor; setup constraint state
*
*
* @return void
*/
public function __construct()
......@@ -71,8 +71,8 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Indicate negative match
*
* @param bool $flag
*
* @param bool $flag
* @return void
*/
public function setNegate($flag = true)
......@@ -82,7 +82,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Evaluate an object to see if it fits the constraints
*
*
* @param Zend_Controller_Response_Abstract $other String to examine
* @param null|string Assertion type
* @return bool
......@@ -159,15 +159,15 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Report Failure
*
*
* @see PHPUnit_Framework_Constraint for implementation details
* @param mixed $other
* @param mixed $other
* @param string $description Additional message to display
* @param bool $not
* @param bool $not
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
public function fail($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL)
{
$not = $comparisonFailure;
//public function fail($other, $description, $not = false)
......@@ -214,7 +214,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Complete implementation
*
*
* @return string
*/
public function toString()
......@@ -224,9 +224,9 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Compare response code for positive match
*
* @param Zend_Controller_Response_Abstract $response
* @param int $code
*
* @param Zend_Controller_Response_Abstract $response
* @param int $code
* @return bool
*/
protected function _code(Zend_Controller_Response_Abstract $response, $code)
......@@ -237,9 +237,9 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Compare response code for negative match
*
* @param Zend_Controller_Response_Abstract $response
* @param int $code
*
* @param Zend_Controller_Response_Abstract $response
* @param int $code
* @return bool
*/
protected function _notCode(Zend_Controller_Response_Abstract $response, $code)
......@@ -250,8 +250,8 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Retrieve response code
*
* @param Zend_Controller_Response_Abstract $response
*
* @param Zend_Controller_Response_Abstract $response
* @return int
*/
protected function _getCode(Zend_Controller_Response_Abstract $response)
......@@ -265,9 +265,9 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Positive check for response header presence
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @return bool
*/
protected function _header(Zend_Controller_Response_Abstract $response, $header)
......@@ -277,9 +277,9 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Negative check for response header presence
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @return bool
*/
protected function _notHeader(Zend_Controller_Response_Abstract $response, $header)
......@@ -289,9 +289,9 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Retrieve response header
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @return string|null
*/
protected function _getHeader(Zend_Controller_Response_Abstract $response, $header)
......@@ -306,10 +306,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Positive check for header contents matching pattern
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $match
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $match
* @return bool
*/
protected function _headerContains(Zend_Controller_Response_Abstract $response, $header, $match)
......@@ -325,10 +325,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Negative check for header contents matching pattern
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $match
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $match
* @return bool
*/
protected function _notHeaderContains(Zend_Controller_Response_Abstract $response, $header, $match)
......@@ -344,10 +344,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Positive check for header contents matching regex
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $pattern
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $pattern
* @return bool
*/
protected function _headerRegex(Zend_Controller_Response_Abstract $response, $header, $pattern)
......@@ -363,10 +363,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
/**
* Negative check for header contents matching regex
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $pattern
*
* @param Zend_Controller_Response_Abstract $response
* @param string $header
* @param string $pattern
* @return bool
*/
protected function _notHeaderRegex(Zend_Controller_Response_Abstract $response, $header, $pattern)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment