- \PHPUnit_Framework_Constraint
- \PHPUnit_Framework_Constraint_ExceptionMessageRegExp
 
 
class (none) \ PHPUnit_Framework_Constraint_ExceptionMessageRegExp
- All implemented interfaces:
 - Countable, PHPUnit_Framework_SelfDescribing
 
Abstract base class for constraints. which are placed upon any value. (from PHPUnit_Framework_Constraint)
Method Summary
| Name | Description | 
|---|---|
| __construct($expected) | |
| failureDescription($other) | Returns the description of the failure | 
| matches($other) | Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise. | 
| toString() | Returns a string representation of the object. | 
Inherited Method Summary
| Name | Description | 
|---|---|
| additionalFailureDescription($other) | Return additional failure description where needed (from PHPUnit_Framework_Constraint) | 
| count() | Counts the number of constraint elements. (from PHPUnit_Framework_Constraint) | 
| evaluate($other, $description = "", $returnResult = false) | Evaluates the constraint for parameter $other (from PHPUnit_Framework_Constraint) | 
| fail($other, $description, ComparisonFailure $comparisonFailure = null) | Throws an exception for the given compared value and test description (from PHPUnit_Framework_Constraint) | 
public function __construct($expected)
- Overrides:
 - __construct()
 - Parameters:
 string- $expected
protected function failureDescription($other)
Returns the description of the failure
The beginning of failure messages is "Failed asserting that" in most cases. This method should return the second part of that sentence.
- Overrides:
 - failureDescription($other)
 - Parameters:
 mixed- $other Evaluated value or object.- Returns:
 - string
 
protected function matches($other)
Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
This method can be overridden to implement the evaluation algorithm. (from matches)
- Overrides:
 - matches($other)
 - Parameters:
 Exception- $other- Returns:
 - boolean
 
public function toString()
Returns a string representation of the object. (from toString)
- Returns:
 - string