[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Framework_Constraint_PCREMatch

Source Location: /PHPUnit2-3.0.0alpha11/Framework/Constraint/PCREMatch.php

Class Overview

Constraint which performas a PCRE pattern match with another value.



  • Release: @package_version@


  • 2002-2006 Sebastian Bergmann <>


Inherited Variables

Inherited Methods

Class Details

[line 73]
Constraint which performas a PCRE pattern match with another value.

Checks a given value using the Perl Compatible Regular Expression extension in PHP. The pattern is matched by executing preg_match().

The pattern string passed in the constructor.

[ Top ]

Method Detail

__construct (Constructor)   [line 77]

PHPUnit2_Framework_Constraint_PCREMatch __construct( $pattern)

  • Access: public


   $pattern   — 

[ Top ]

evaluate   [line 89]

bool evaluate( mixed $other)

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
  • Access: public


mixed   $other   —  Value or object to evaluate.

[ Top ]

fail   [line 101]

void fail( mixed $other, string $description)

  • Throws: PHPUnit2_Framework_ExpectationFailedException
  • Access: public


mixed   $other   —  The value passed to evaluate() which failed the constraint check.
string   $description   —  A string with extra description of what was going on while the evaluation failed.

[ Top ]

toString   [line 121]

string toString( )

Returns a string representation of the constraint.
  • Access: public

[ Top ]

Documentation generated on Mon, 11 Mar 2019 14:40:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.