ShortFailureDescriptionTrait
trait ShortFailureDescriptionTrait
internal | This class is not covered by the backward compatibility promise |
Methods
Returns a string representation of the constraint.
Returns the description of the failure.
Returns the description of the failure when this constraint appears in context of an $operator expression.
Returns a custom string representation of the constraint object when it appears in context of an $operator expression.
No description
Details
at line 26
abstract string
toString()
Returns a string representation of the constraint.
at line 36
final string
failureDescription(mixed $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.
at line 57
final string
failureDescriptionInContext(Operator $operator, mixed $role, mixed $other)
Returns the description of the failure when this constraint appears in context of an $operator expression.
The purpose of this method is to provide meaningful failue description in context of operators such as LogicalNot. Native PHPUnit constraints are supported out of the box by LogicalNot, but externally developed ones had no way to provide correct messages in this context.
The method shall return empty string, when it does not handle customization by itself.
at line 83
abstract protected string
toStringInContext(Operator $operator, mixed $role)
Returns a custom string representation of the constraint object when it appears in context of an $operator expression.
The purpose of this method is to provide meaningful descriptive string in context of operators such as LogicalNot. Native PHPUnit constraints are supported out of the box by LogicalNot, but externally developed ones had no way to provide correct strings in this context.
The method shall return empty string, when it does not handle customization by itself.
at line 85
abstract protected Exporter
exporter()
No description