API Documentation

Zend/Test/PHPUnit/Constraint/Redirect.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Test  
Subpackage
PHPUnit  
Version
$Id: Redirect.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Test_PHPUnit_Constraint_Redirect

Package: Zend\Test\PHPUnit

Redirection constraints

Parent(s)
\PHPUnit_Framework_Constraint
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
\PHPUnit_Framework_Constraint  

Constants

Constant  ASSERT_REDIRECT = 'assertRedirect'
Constant  ASSERT_REDIRECT_TO = 'assertRedirectTo'
Constant  ASSERT_REDIRECT_REGEX = 'assertRedirectRegex'

Properties

Propertyprotectedstring  $_assertType= 'null'

Current assertion type

Default valuenullDetails
Type
string
Propertyprotectedarray  $_assertTypes= 'array( self::ASSERT_REDIRECT'

Available assertion types

Default valuearray( self::ASSERT_REDIRECTDetails
Type
array
Propertyprotectedstring  $_match= 'null'

Pattern to match against

Default valuenullDetails
Type
string
Propertyprotectedbool  $_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
Name Type Description
$response \Zend_Controller_Response_HttpTestCase
$match string

Content to match

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

Check to see if content is NOT matched in selected nodes

Parameters
Name Type Description
$response \Zend_Controller_Response_HttpTestCase
$match string
Returns
Type Description
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
Name Type Description
$response \Zend_Controller_Response_HttpTestCase
$pattern string
Returns
Type Description
bool
methodprotected_regex( \Zend_Controller_Response_HttpTestCase $response, string $pattern ) : bool

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

Parameters
Name Type Description
$response \Zend_Controller_Response_HttpTestCase
$pattern string
Returns
Type Description
bool
methodpublicevaluate( string $other, null|string $assertType = null ) : bool

Evaluate an object to see if it fits the constraints

Parameters
Name Type Description
$other string

String to examine

$assertType null|string

Assertion type

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

Report Failure

Parameters
Name Type Description
$other mixed
$description string

Additional message to display

$not bool
Throws
Exception Description
\PHPUnit_Framework_ExpectationFailedException
Details
See
\PHPUnit_Framework_Constraint  
methodpublicsetNegate( bool $flag = true ) : void

Indicate negative match

Parameters
Name Type Description
$flag bool
methodpublictoString( ) : string

Complete implementation

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.