Test/PHPUnit/Constraint/Redirect34.php

Show: PublicProtectedPrivateinherited
Table of Contents
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.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Test  
Subpackage
PHPUnit  
Version
$Id$  

\Zend_Test_PHPUnit_Constraint_Redirect

Package: Zend_Test\PHPUnit
Redirection constraints
Parent(s)
\PHPUnit_Framework_Constraint
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
 

Constants

>VConstant  ASSERT_REDIRECT = 'assertRedirect'
>VConstant  ASSERT_REDIRECT_TO = 'assertRedirectTo'
>VConstant  ASSERT_REDIRECT_REGEX = 'assertRedirectRegex'

Properties

>VPropertyprotected$_actual = null
What is actual redirect
Default valuenullDetails
Type
n/a
>VPropertyprotectedstring $_assertType = null
Current assertion type
Default valuenullDetails
Type
string
>VPropertyprotectedarray $_assertTypes = array(self::ASSERT_REDIRECT, self::ASSERT_REDIRECT_TO, self::ASSERT_REDIRECT_REGEX)
Available assertion types
Default valuearray(self::ASSERT_REDIRECT, self::ASSERT_REDIRECT_TO, self::ASSERT_REDIRECT_REGEX)Details
Type
array
>VPropertyprotectedstring $_match = null
Pattern to match against
Default valuenullDetails
Type
string
>VPropertyprotectedbool $_negate = false
Whether or not assertion is negated
Default valuefalseDetails
Type
bool

Methods

methodpublic__construct() : void

Constructor; setup constraint state

methodprotected_match(\Zend_Controller_Response_HttpTestCase $response, string $match) : bool

Check to see if content is matched in selected nodes

Parameters
NameTypeDescription
$response\Zend_Controller_Response_HttpTestCase
$matchstring

Content to match

Returns
TypeDescription
bool
methodprotected_notMatch(\Zend_Controller_Response_HttpTestCase $response, string $match) : bool

Check to see if content is NOT matched in selected nodes

Parameters
NameTypeDescription
$response\Zend_Controller_Response_HttpTestCase
$matchstring
Returns
TypeDescription
bool
methodprotected_notRegex(\Zend_Controller_Response_HttpTestCase $response, string $pattern) : bool

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

Parameters
NameTypeDescription
$response\Zend_Controller_Response_HttpTestCase
$patternstring
Returns
TypeDescription
bool
methodprotected_regex(\Zend_Controller_Response_HttpTestCase $response, string $pattern) : bool

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

Parameters
NameTypeDescription
$response\Zend_Controller_Response_HttpTestCase
$patternstring
Returns
TypeDescription
bool
methodpublicevaluate(string $other,  $assertType = null) : bool

Evaluate an object to see if it fits the constraints

Parameters
NameTypeDescription
$otherstring

String to examine

$assertType
Returns
TypeDescription
bool
methodpublicfail(mixed $other, string $description, bool $not = false) : void

Report Failure

Parameters
NameTypeDescription
$othermixed
$descriptionstring

Additional message to display

$notbool
Throws
ExceptionDescription
\PHPUnit_Framework_ExpectationFailedException
Details
See
for implementation details  
methodpublicsetNegate(bool $flag = true) : void

Indicate negative match

Parameters
NameTypeDescription
$flagbool
methodpublictoString() : string

Complete implementation

Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .