PHP Class PHPUnit_Framework_Constraint_PCREMatch, qcodo

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.
Author: Sebastian Bergmann ([email protected])
Inheritance: extends PHPUnit_Framework_Constraint
Show file Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$pattern string

Public Methods

Method Description
__construct ( string $pattern )
evaluate ( mixed $other ) : boolean Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
toString ( ) : string Returns a string representation of the constraint.

Method Details

__construct() public method

public __construct ( string $pattern )
$pattern string

evaluate() public method

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
public evaluate ( mixed $other ) : boolean
$other mixed Value or object to evaluate.
return boolean

toString() public method

Returns a string representation of the constraint.
public toString ( ) : string
return string

Property Details

$pattern protected property

protected string $pattern
return string