Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Response header PHPUnit Constraint
ASSERT_RESPONSE_CODE = 'assertResponseCode'
Details ASSERT_HEADER = 'assertHeader'
Details ASSERT_HEADER_CONTAINS = 'assertHeaderContains'
Details ASSERT_HEADER_REGEX = 'assertHeaderRegex'
Detailsstring $_assertType = 'null'Current assertion type
Detailsarray $_assertTypes = 'array'Available assertion types
Detailsint $_code = '200'
Detailsstring $_header = 'null'
Detailsstring $_match = 'null'
Detailsbool $_negate = 'false'Whether or not assertion is negated
Details__construct(
)
:
voidConstructor; setup constraint state
Details_code(
Zend_Controller_Response_Abstract $response, int $code
)
:
boolCompare response code for positive match
Details_getCode(
Zend_Controller_Response_Abstract $response
)
:
intRetrieve response code
Details_getHeader(
Zend_Controller_Response_Abstract $response, string $header
)
:
string|nullRetrieve response header
Details_header(
Zend_Controller_Response_Abstract $response, string $header
)
:
boolPositive check for response header presence
Details_headerContains(
Zend_Controller_Response_Abstract $response, string $header, string $match
)
:
boolPositive check for header contents matching pattern
Details_headerRegex(
Zend_Controller_Response_Abstract $response, string $header, string $pattern
)
:
boolPositive check for header contents matching regex
Details_notCode(
Zend_Controller_Response_Abstract $response, int $code
)
:
boolCompare response code for negative match
Details_notHeader(
Zend_Controller_Response_Abstract $response, string $header
)
:
boolNegative check for response header presence
Details_notHeaderContains(
Zend_Controller_Response_Abstract $response, string $header, string $match
)
:
boolNegative check for header contents matching pattern
Details_notHeaderRegex(
Zend_Controller_Response_Abstract $response, string $header, string $pattern
)
:
boolNegative check for header contents matching regex
Detailsevaluate(
Zend_Controller_Response_Abstract $other, null|string $assertType
=
null
)
:
boolEvaluate an object to see if it fits the constraints
Detailsfail(
mixed $other, string $description, bool $not
=
false
)
:
voidReport Failure
DetailssetNegate(
bool $flag
=
true
)
:
voidIndicate negative match
DetailstoString(
)
:
stringComplete implementation
Details