PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Framework_Constraint_IsEqual

Source Location: /PHPUnit2-3.0.0alpha11/Framework/Constraint/IsEqual.php

Class Overview


Constraint which checks if one value is equal to another.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Inherited Variables

Inherited Methods


Class Details

[line 229]
Constraint which checks if one value is equal to another.

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.



[ Top ]


Method Detail

evaluate   [line 247]

bool evaluate( mixed $other)

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.

Parameters:

mixed   $other     Value or object to evaluate.

[ Top ]

fail   [line 286]

void fail( mixed $other, string $description)

  • Throws: PHPUnit2_Framework_ExpectationFailedException

Parameters:

mixed   $other     The value passed to evaluate() which failed the constraint check.
string   $description     A string with extra description of what was going on while the evaluation failed.

[ Top ]

toString   [line 300]

string toString( )

Returns a string representation of the constraint.
  • Access: public

[ Top ]


Documentation generated on Tue, 12 Sep 2006 09:37:14 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.