Zend Framework
1.12
|
Public Member Functions | |
__construct () | |
Constructor; setup constraint state. | |
setNegate ($flag=true) | |
Indicate negative match. | |
evaluate ($other, $assertType=null) | |
Evaluate an object to see if it fits the constraints. | |
fail ($other, $description, $not=false) | |
Report Failure. | |
toString () | |
Complete implementation. | |
__construct () | |
Constructor; setup constraint state. | |
setNegate ($flag=true) | |
Indicate negative match. | |
evaluate ($response, $assertType= '', $variable=FALSE) | |
Evaluate an object to see if it fits the constraints. | |
fail ($other, $description, PHPUnit_Framework_ComparisonFailure $cannot_be_used=NULL) | |
Report Failure. | |
toString () | |
Complete implementation. | |
Public Attributes | |
const | ASSERT_RESPONSE_CODE = 'assertResponseCode' |
#@+ Assertion type constants | |
const | ASSERT_HEADER = 'assertHeader' |
const | ASSERT_HEADER_CONTAINS = 'assertHeaderContains' |
const | ASSERT_HEADER_REGEX = 'assertHeaderRegex' |
Protected Member Functions | |
_code (Zend_Controller_Response_Abstract $response, $code) | |
Compare response code for positive match. | |
_notCode (Zend_Controller_Response_Abstract $response, $code) | |
Compare response code for negative match. | |
_getCode (Zend_Controller_Response_Abstract $response) | |
Retrieve response code. | |
_header (Zend_Controller_Response_Abstract $response, $header) | |
Positive check for response header presence. | |
_notHeader (Zend_Controller_Response_Abstract $response, $header) | |
Negative check for response header presence. | |
_getHeader (Zend_Controller_Response_Abstract $response, $header) | |
Retrieve response header. | |
_headerContains (Zend_Controller_Response_Abstract $response, $header, $match) | |
Positive check for header contents matching pattern. | |
_notHeaderContains (Zend_Controller_Response_Abstract $response, $header, $match) | |
Negative check for header contents matching pattern. | |
_headerRegex (Zend_Controller_Response_Abstract $response, $header, $pattern) | |
Positive check for header contents matching regex. | |
_notHeaderRegex (Zend_Controller_Response_Abstract $response, $header, $pattern) | |
Negative check for header contents matching regex. | |
_code (Zend_Controller_Response_Abstract $response, $code) | |
Compare response code for positive match. | |
_notCode (Zend_Controller_Response_Abstract $response, $code) | |
Compare response code for negative match. | |
_getCode (Zend_Controller_Response_Abstract $response) | |
Retrieve response code. | |
_header (Zend_Controller_Response_Abstract $response, $header) | |
Positive check for response header presence. | |
_notHeader (Zend_Controller_Response_Abstract $response, $header) | |
Negative check for response header presence. | |
_getHeader (Zend_Controller_Response_Abstract $response, $header) | |
Retrieve response header. | |
_headerContains (Zend_Controller_Response_Abstract $response, $header, $match) | |
Positive check for header contents matching pattern. | |
_notHeaderContains (Zend_Controller_Response_Abstract $response, $header, $match) | |
Negative check for header contents matching pattern. | |
_headerRegex (Zend_Controller_Response_Abstract $response, $header, $pattern) | |
Positive check for header contents matching regex. | |
_notHeaderRegex (Zend_Controller_Response_Abstract $response, $header, $pattern) | |
Negative check for header contents matching regex. | |
Protected Attributes | |
$_assertType = null | |
$_assertTypes | |
$_code = 200 | |
$_actualCode = null | |
$_header = null | |
$_match = null | |
$_negate = false | |
__construct | ( | ) |
Constructor; setup constraint state.
__construct | ( | ) |
Constructor; setup constraint state.
|
protected |
Compare response code for positive match.
Zend_Controller_Response_Abstract | $response | |
int | $code |
|
protected |
Compare response code for positive match.
Zend_Controller_Response_Abstract | $response | |
int | $code |
|
protected |
|
protected |
|
protected |
Retrieve response header.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Retrieve response header.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Positive check for response header presence.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Positive check for response header presence.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Positive check for header contents matching pattern.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $match |
|
protected |
Positive check for header contents matching pattern.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $match |
|
protected |
Positive check for header contents matching regex.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $pattern |
|
protected |
Positive check for header contents matching regex.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $pattern |
|
protected |
Compare response code for negative match.
Zend_Controller_Response_Abstract | $response | |
int | $code |
|
protected |
Compare response code for negative match.
Zend_Controller_Response_Abstract | $response | |
int | $code |
|
protected |
Negative check for response header presence.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Negative check for response header presence.
Zend_Controller_Response_Abstract | $response | |
string | $header |
|
protected |
Negative check for header contents matching pattern.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $match |
|
protected |
Negative check for header contents matching pattern.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $match |
|
protected |
Negative check for header contents matching regex.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $pattern |
|
protected |
Negative check for header contents matching regex.
Zend_Controller_Response_Abstract | $response | |
string | $header | |
string | $pattern |
evaluate | ( | $other, | |
$assertType = null |
|||
) |
Evaluate an object to see if it fits the constraints.
Zend_Controller_Response_Abstract | $other | String to examine |
null|string | Assertion type |
evaluate | ( | $response, | |
$assertType = '' , |
|||
$variable = FALSE |
|||
) |
Evaluate an object to see if it fits the constraints.
object | of Zend_Controller_Response_Abstract to be evaluated |
null|string | Assertion type |
int|string | HTTP response code to evaluate against | header string (haystack) |
string | (optional) match (needle), may be required depending on assertion type |
fail | ( | $other, | |
$description, | |||
$not = false |
|||
) |
Report Failure.
mixed | $other | |
string | $description | Additional message to display |
bool | $not |
PHPUnit_Framework_ExpectationFailedException |
fail | ( | $other, | |
$description, | |||
PHPUnit_Framework_ComparisonFailure | $cannot_be_used = NULL |
||
) |
Report Failure.
mixed | CSS selector path |
string | Failure description |
object | Cannot be used, null |
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 |
setNegate | ( | $flag = true | ) |
Indicate negative match.
bool | $flag |
setNegate | ( | $flag = true | ) |
Indicate negative match.
bool | $flag |
toString | ( | ) |
Complete implementation.
toString | ( | ) |
Complete implementation.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const ASSERT_HEADER = 'assertHeader' |
const ASSERT_HEADER_CONTAINS = 'assertHeaderContains' |
const ASSERT_HEADER_REGEX = 'assertHeaderRegex' |
const ASSERT_RESPONSE_CODE = 'assertResponseCode' |
#@+ Assertion type constants