BlueSpice MediaWiki master
|
Public Member Functions | |
evaluate ($other, $description= '', $returnResult=false) | |
count () | |
![]() | |
toString () | |
Protected Member Functions | |
matches ($other) | |
fail ($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure=null) | |
additionalFailureDescription ($other) | |
failureDescription ($other) | |
Protected Attributes | |
$exporter | |
Abstract base class for constraints which can be applied to any value.
|
protected |
Return additional failure description where needed
The function can be overridden to provide additional failure information like a diff
mixed | $other | Evaluated value or object. |
PHPUnit_Framework_Constraint::count | ( | ) |
Counts the number of constraint elements.
Implements Countable.
PHPUnit_Framework_Constraint::evaluate | ( | $other, | |
$description = '' , |
|||
$returnResult = false |
|||
) |
Evaluates the constraint for parameter $other
If $returnResult is set to false (the default), an exception is thrown in case of a failure. null is returned otherwise.
If $returnResult is true, the result of the evaluation is returned as a boolean value instead: true in case of success, false in case of a failure.
mixed | $other | Value or object to evaluate. |
string | $description | Additional information about the test |
bool | $returnResult | Whether to return a result or throw an exception |
PHPUnit_Framework_ExpectationFailedException |
|
protected |
Throws an exception for the given compared value and test description
mixed | $other | Evaluated value or object. |
string | $description | Additional information about the test |
SebastianBergmann\Comparator\ComparisonFailure | $comparisonFailure |
PHPUnit_Framework_ExpectationFailedException |
|
protected |
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.
To provide additional failure information additionalFailureDescription can be used.
mixed | $other | Evaluated value or object. |
|
protected |
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.
mixed | $other | Value or object to evaluate. |