API Documentation

Test/PHPUnit/Constraint/Redirect.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Test
subpackage
PHPUnit
version
$Id: Redirect.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Test_PHPUnit_Constraint_Redirect

Description

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.

Zend_Test_PHPUnit_Constraint_Redirect

Extends from
PHPUnit_Framework_Constraint
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Test
subpackage
PHPUnit
uses
PHPUnit_Framework_Constraint
Constants
ASSERT_REDIRECT
ASSERT_REDIRECT_TO
ASSERT_REDIRECT_REGEX
Properties
$_assertType
$_assertTypes
$_match
$_negate
Methods
__construct
setNegate
evaluate
fail
toString
_match
_notMatch
_regex
_notRegex

Description

Redirection constraints

Constants

ASSERT_REDIRECT

 ASSERT_REDIRECT = 'assertRedirect'

Details

value
assertRedirect

ASSERT_REDIRECT_TO

 ASSERT_REDIRECT_TO = 'assertRedirectTo'

Details

value
assertRedirectTo

ASSERT_REDIRECT_REGEX

 ASSERT_REDIRECT_REGEX = 'assertRedirectRegex'

Details

value
assertRedirectRegex

Properties

$_assertType

string $_assertType = 'null'

Current assertion type

Details

$_assertType
string
visibility
protected
default
null
final
false
static
false

$_assertTypes

array $_assertTypes = 'array'

Available assertion types

Details

$_assertTypes
array
visibility
protected
default
array
final
false
static
false

$_match

string $_match = 'null'

Pattern to match against

Details

$_match
string
visibility
protected
default
null
final
false
static
false

$_negate

bool $_negate = 'false'

Whether or not assertion is negated

Details

$_negate
bool
visibility
protected
default
false
final
false
static
false

Methods

__construct

__construct( ) : void

Constructor; setup constraint state

Details
visibility
public
final
false
static
false

_match

_match( Zend_Controller_Response_HttpTestCase $response, string $match ) : bool

Check to see if content is matched in selected nodes

Arguments
$response
Zend_Controller_Response_HttpTestCase
$match
string
Content to match
Output
bool
Details
visibility
protected
final
false
static
false

_notMatch

_notMatch( Zend_Controller_Response_HttpTestCase $response, string $match ) : bool

Check to see if content is NOT matched in selected nodes

Arguments
$response
Zend_Controller_Response_HttpTestCase
$match
string
Output
bool
Details
visibility
protected
final
false
static
false

_notRegex

_notRegex( Zend_Controller_Response_HttpTestCase $response, string $pattern ) : bool

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

Arguments
$response
Zend_Controller_Response_HttpTestCase
$pattern
string
Output
bool
Details
visibility
protected
final
false
static
false

_regex

_regex( Zend_Controller_Response_HttpTestCase $response, string $pattern ) : bool

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

Arguments
$response
Zend_Controller_Response_HttpTestCase
$pattern
string
Output
bool
Details
visibility
protected
final
false
static
false

evaluate

evaluate( string $other, null|string $assertType = null ) : bool

Evaluate an object to see if it fits the constraints

Arguments
$other
string
String to examine
$assertType
nullstring
Assertion type
Output
bool
Details
visibility
public
final
false
static
false

fail

fail( mixed $other, string $description, bool $not = false ) : void

Report Failure

Arguments
$other
mixed
$description
string
Additional message to display
$not
bool
Details
visibility
public
final
false
static
false
see
PHPUnit_Framework_Constraint for implementation details
throws

setNegate

setNegate( bool $flag = true ) : void

Indicate negative match

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

toString

toString( ) : string

Complete implementation

Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.