Redirection constraints

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(string $other, $assertType = null, $variable = FALSE) : boolean

Parameters

$other

string

String to examine

$assertType

$variable

Returns

booleanNOTE: 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(mixed $other, string $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL) : void
see for implementation details

Parameters

$other

mixed

$description

string

Additional message to display

$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 NOTE 2: Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator

Indicate negative match

setNegate(boolean $flag = true) : void

Parameters

$flag

boolean

Complete implementation

toString() : string

Returns

string

Check to see if content is matched in selected nodes

_match(\Zend_Controller_Response_HttpTestCase $response, string $match) : boolean

Parameters

$response

\Zend_Controller_Response_HttpTestCase

$match

string

Content to match

Returns

boolean

Check to see if content is NOT matched in selected nodes

_notMatch(\Zend_Controller_Response_HttpTestCase $response, string $match) : boolean

Parameters

$response

\Zend_Controller_Response_HttpTestCase

$match

string

Returns

boolean

Check to see if content is NOT matched by regex in selected nodes

_notRegex(\Zend_Controller_Response_HttpTestCase $response, string $pattern) : boolean

Parameters

$response

\Zend_Controller_Response_HttpTestCase

$pattern

string

Returns

boolean

Check to see if content is matched by regex in selected nodes

_regex(\Zend_Controller_Response_HttpTestCase $response, string $pattern) : boolean

Parameters

$response

\Zend_Controller_Response_HttpTestCase

$pattern

string

Returns

boolean

 Properties

 

What is actual redirect

$_actual 

Default

null
 

Current assertion type

$_assertType : string

Default

null
 

Available assertion types

$_assertTypes : array

Default

array(self::ASSERT_REDIRECT, self::ASSERT_REDIRECT_TO, self::ASSERT_REDIRECT_REGEX)
 

Pattern to match against

$_match : string

Default

null
 

Whether or not assertion is negated

$_negate : boolean

Default

false

 Constants

 

ASSERT_REDIRECT

ASSERT_REDIRECT = 'assertRedirect' 
 

ASSERT_REDIRECT_REGEX

ASSERT_REDIRECT_REGEX = 'assertRedirectRegex' 
 

ASSERT_REDIRECT_TO

ASSERT_REDIRECT_TO = 'assertRedirectTo'