uses |
|
category |
Zend |
package |
Zend_Test |
subpackage |
PHPUnit |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
Methods
Constructor; setup constraint state
__construct() : void
Evaluate an object to see if it fits the constraints
evaluate($response, $assertType = ''
, $variable = FALSE
) : boolean
Parameters
$response
$assertType
$variable
Returns
boolean
NOTE:
Drastic changes up to PHPUnit 3.5.15 this was:
public function evaluate($other, $assertType = null)
In PHPUnit 3.6.0 they changed the interface into this:
public function evaluate($other, $description = '', $returnResult = FALSE)
We use the new interface for PHP-strict checking, but emulate the old one
Report Failure
fail($other, $description, \PHPUnit_Framework_ComparisonFailure $cannot_be_used = NULL
) : void
Parameters
$other
$description
$cannot_be_used
Exceptions
\PHPUnit_Framework_ExpectationFailedException |
NOTE:
Drastic changes up to PHPUnit 3.5.15 this was:
public function fail($other, $description, $not = false)
In PHPUnit 3.6.0 they changed the interface into this:
protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
We use the new interface for PHP-strict checking |
Indicate negative match
setNegate(boolean $flag = true
) : void
Complete implementation
toString() : string
Compare response code for positive match
_code(\Zend_Controller_Response_Abstract $response, integer $code) : boolean
Parameters
$response
\Zend_Controller_Response_Abstract
$code
integer
Returns
boolean
Retrieve response code
_getCode(\Zend_Controller_Response_Abstract $response) : integer
Parameters
$response
\Zend_Controller_Response_Abstract
Returns
integer
Compare response code for negative match
_notCode(\Zend_Controller_Response_Abstract $response, integer $code) : boolean
Parameters
$response
\Zend_Controller_Response_Abstract
$code
integer
Returns
boolean
Properties
Actual response code
$_actualCode : integer
Current assertion type
$_assertType : string
Available assertion types
$_assertTypes : array
Default
array(self::ASSERT_RESPONSE_CODE, self::ASSERT_HEADER, self::ASSERT_HEADER_CONTAINS, self::ASSERT_HEADER_REGEX)
Response code
$_code : integer
pattern against which to compare header content
$_match : string
Whether or not assertion is negated
$_negate : boolean
Constants
ASSERT_RESPONSE_CODE
ASSERT_RESPONSE_CODE = 'assertResponseCode'