- Extends
PHPUnit\Framework\Constraint\Constraint - Implements
Countable PHPUnit\Framework\SelfDescribing
Methods |
public PHPUnit\Framework\Constraint\Constraint::count() : int Counts the number of constraint elements. |
public PHPUnit\Framework\Constraint\Constraint::evaluate( $other, string $description = '', bool $returnResult = false) : ?bool Evaluates the constraint for parameter $other. If $returnResult is set to false (the default), an exception is thrown If $returnResult is true, the result of the evaluation is returned as |
public toString() : string |
Methods |
protected additionalFailureDescription( $other) : string |
protected PHPUnit\Framework\Constraint\Constraint::exporter() : SebastianBergmann\Exporter\Exporter |
protected PHPUnit\Framework\Constraint\Constraint::fail( $other, $description, ?SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL) : void Throws an exception for the given compared value and test description.
|
protected failureDescription( $other) : string |
protected PHPUnit\Framework\Constraint\Constraint::failureDescriptionInContext(PHPUnit\Framework\Constraint\Operator $operator, $role, $other) : string Returns the description of the failure when this constraint appears in The purpose of this method is to provide meaningful failue description The method shall return empty string, when it does not handle
|
protected matches( $other) : bool |
protected PHPUnit\Framework\Constraint\Constraint::reduce() : self Reduces the sub-expression starting at $this by skipping degenerate Returns $this for terminal constraints and for operators that start A constraint expression may be modelled as a tree with non-terminal
A degenerate sub-expression is a part of the tree, that effectively does
is equivalent to
because the subexpression
is degenerate. Calling reduce() on the LogicalOr object above, as well Other specific reductions can be implemented, for example cascade of
can be reduced to
|
protected PHPUnit\Framework\Constraint\Constraint::toStringInContext(PHPUnit\Framework\Constraint\Operator $operator, $role) : string Returns a custom string representation of the constraint object when it The purpose of this method is to provide meaningful descriptive string The method shall return empty string, when it does not handle
|