Skip to content

BaseConstraintBecausePhpunitSucksAtBackwardsCompatibility

Base constraint that caters for breaking changes between PHPUnit 3.5 and 3.6.

Concrete constraints must implement match().

abstract class BaseConstraintBecausePhpunitSucksAtBackwardsCompatibility extends Constraint

ExtendsConstraint
Since1.0.0
SourceTesting/BaseConstraintBecausePhpunitSucksAtBackwardsCompatibility.php
MethodDescription
evaluate(mixed $other, string $description = '', bool $returnResult = false): ?boolOverridden function to cover differences between PHPUnit 3.5 and 3.6.

public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool

Overridden function to cover differences between PHPUnit 3.5 and 3.6.

Whether to return a result or throw an exception (3.6+).

ParameterTypeDescription
$othermixedThe item to evaluate.
$descriptionstringAdditional information about the test (3.6+).
$returnResultboolWhether to return a result or throw an exception (3.6+).

Returns ?``bool

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
count()ConstraintCounts the number of constraint elements.
toString()SelfDescribingReturns a string representation of the object.