\PHPUnit_Framework_Constraint_IsIdentical

Constraint that asserts that one value is identical to another.

Identical check is performed with PHP's === operator, the operator is
explained in detail at
{@url http://www.php.net/manual/en/types.comparisons.php}.
Two values are identical if they have the same value and are of the same
type.

The expected value is passed in the constructor.

Synopsis

class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constraint {
  • // constants
  • const EPSILON = 0.0000000001;
  • // members
  • protected mixed $value;
  • // Inherited members from PHPUnit_Framework_Constraint
  • protected $exporter;
}

Hierarchy

Violations

PHPMessDetector

Line Rule Message
104 - 133 CyclomaticComplexity The method evaluate() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.

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_IsIdentical" is not in camel caps format
100 123 warning Line exceeds 120 characters; contains 122 characters

Constants

Name Value
EPSILON 0.0000000001

Members

protected

  • $exporter
  • $value — mixed

Methods

protected

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