PHP Class PHPUnit_Framework_Constraint_IsEqual, qcodo

Equality is checked with PHP's == operator, the operator is explained in detail at {@url http://www.php.net/manual/en/types.comparisons.php}. Two values are equal if they have the same value disregarding type. The expected value is passed in the constructor.
Inheritance: extends PHPUnit_Framework_Constraint
ファイルを表示 Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$canonicalize boolean
$delta float
$ignoreCase boolean
$maxDepth integer
$value mixed

Public Methods

Method Description
__construct ( mixed $value, float $delta, integer $maxDepth = 10, boolean $canonicalize = FALSE, boolean $ignoreCase = FALSE )
evaluate ( mixed $other ) : boolean Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
fail ( mixed $other, string $description, boolean $not = FALSE )
toString ( ) : string Returns a string representation of the constraint.

Protected Methods

Method Description
domToText ( DOMDocument $document ) : string Returns the normalized, whitespace-cleaned, and indented textual representation of a DOMDocument.
numericComparison ( mixed $a, mixed $b ) : boolean Compares two numeric values - use delta if applicable.
recursiveComparison ( mixed $a, mixed $b, integer $depth ) : boolean Perform the actual recursive comparison of two values

Method Details

__construct() public method

public __construct ( mixed $value, float $delta, integer $maxDepth = 10, boolean $canonicalize = FALSE, boolean $ignoreCase = FALSE )
$value mixed
$delta float
$maxDepth integer
$canonicalize boolean
$ignoreCase boolean

domToText() protected method

Returns the normalized, whitespace-cleaned, and indented textual representation of a DOMDocument.
protected domToText ( DOMDocument $document ) : string
$document DOMDocument
return string

evaluate() public method

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
public evaluate ( mixed $other ) : boolean
$other mixed Value or object to evaluate.
return boolean

fail() public method

public fail ( mixed $other, string $description, boolean $not = FALSE )
$other mixed The value passed to evaluate() which failed the constraint check.
$description string A string with extra description of what was going on while the evaluation failed.
$not boolean Flag to indicate negation.

numericComparison() protected method

Compares two numeric values - use delta if applicable.
protected numericComparison ( mixed $a, mixed $b ) : boolean
$a mixed
$b mixed
return boolean

recursiveComparison() protected method

Perform the actual recursive comparison of two values
protected recursiveComparison ( mixed $a, mixed $b, integer $depth ) : boolean
$a mixed First value
$b mixed Second value
$depth integer Depth
return boolean

toString() public method

Returns a string representation of the constraint.
public toString ( ) : string
return string

Property Details

$canonicalize protected_oe property

protected bool $canonicalize
return boolean

$delta protected_oe property

protected float $delta
return float

$ignoreCase protected_oe property

protected bool $ignoreCase
return boolean

$maxDepth protected_oe property

protected int $maxDepth
return integer

$value protected_oe property

protected mixed $value
return mixed