\PHPUnit_Framework_Constraint_IsEqual

Constraint that checks if one value is equal to another.

Equality is checked with PHP's == operator, the operator is explained in
detail at .
Two values are equal if they have the same value disregarding type.
The expected value is passed in the constructor.

Synopsis

class PHPUnit_Framework_Constraint_IsEqual extends PHPUnit_Framework_Constraint {
  • // Inherited members from PHPUnit_Framework_Constraint
  • protected $exporter;
}

Hierarchy

Violations

Checkstyle

Line Column Severity Message
67 1 error Each class must be in a namespace of at least one level (a top-level vendor name)
67 1 error Class name "PHPUnit_Framework_Constraint_IsEqual" is not in camel caps format
146 123 warning Line exceeds 120 characters; contains 122 characters

Members

protected

Methods

public

Inherited from PHPUnit_Framework_Constraint

protected

  • additionalFailureDescription() — Return additional failure description where needed
  • fail() — Throws an exception for the given compared value and test description
  • failureDescription() — Returns the description of the failure
  • matches() — Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.

public

  • count() — Counts the number of constraint elements.
  • evaluate() — Evaluates the constraint for parameter $other

History