Commit ac213875 authored by llaffont's avatar llaffont
Browse files

compatibilité PHP54

git-svn-id: http://afi-forge.afi-sa.fr/svn/opacce/ZendFramework-1.6.2@522 e3cc70dd-a52f-4065-8a26-0e09943c8c5c
parent 75868297
......@@ -111,8 +111,11 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
* @param null|string Assertion type
* @return bool
*/
public function evaluate($other, $assertType = null)
public function evaluate($other, $description = '', $returnResult = FALSE)
{
$assertType = $description;
//public function evaluate($other, $assertType = null)
if (strstr($assertType, 'Not')) {
$this->setNegate(true);
$assertType = str_replace('Not', '', $assertType);
......@@ -184,8 +187,11 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, $not = false)
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
{
$not = $comparisonFailure;
//public function fail($other, $description, $not = false)
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
switch ($this->_assertType) {
case self::ASSERT_CONTENT_CONTAINS:
......
......@@ -76,8 +76,11 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
* @param null|string Assertion type
* @return bool
*/
public function evaluate($other, $assertType = null)
public function evaluate($other, $description = '', $returnResult = FALSE)
{
//public function evaluate($other, $assertType = null)
$assertType = $description;
if (!$other instanceof Zend_Controller_Response_Abstract) {
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
throw new Zend_Test_PHPUnit_Constraint_Exception('Redirect constraint assertions require a response object');
......@@ -134,8 +137,11 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, $not = false)
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
{
//public function fail($other, $description, $not = false)
$not = $comparisonFailure;
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
switch ($this->_assertType) {
case self::ASSERT_REDIRECT_TO:
......
......@@ -87,8 +87,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
* @param null|string Assertion type
* @return bool
*/
public function evaluate($other, $assertType = null)
public function evaluate($other, $description = '', $returnResult = FALSE)
{
$assertType = $description;
//public function evaluate($other, $assertType = null)
if (!$other instanceof Zend_Controller_Response_Abstract) {
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
throw new Zend_Test_PHPUnit_Constraint_Exception('Header constraint assertions require a response object');
......@@ -165,8 +167,10 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
*/
public function fail($other, $description, $not = false)
protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
{
$not = $comparisonFailure;
//public function fail($other, $description, $not = false)
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
switch ($this->_assertType) {
case self::ASSERT_RESPONSE_CODE:
......
......@@ -167,7 +167,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te
$this->frontController
->setRequest($request)
->setResponse($this->getResponse())
//->throwExceptions(false)
->throwExceptions(false)
->returnResponse(false);
$this->frontController->dispatch();
}
......
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