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

Class: PHPUnit2_Framework_ComparisonFailure

Source Location: /PHPUnit2-3.0.0alpha11/Framework/ComparisonFailure.php

Class Overview

Exception
   |
   --PHPUnit2_Framework_AssertionFailedError
      |
      --PHPUnit2_Framework_ComparisonFailure

Thrown when an assertion for string equality failed.


Author(s):

Version:

  • Release: @package_version@

Copyright:

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

Methods


Child classes:

PHPUnit2_Framework_ComparisonFailure_Array
Thrown when an assertion for array equality failed.
PHPUnit2_Framework_ComparisonFailure_Object
Thrown when an assertion for object equality failed.
PHPUnit2_Framework_ComparisonFailure_Scalar
Thrown when an assertion for scalar equality failed.
PHPUnit2_Framework_ComparisonFailure_String
Thrown when an assertion for string equality failed.
PHPUnit2_Framework_ComparisonFailure_Type
Thrown when an assertion for type equality failed.

Inherited Variables

Inherited Methods

Class: PHPUnit2_Framework_AssertionFailedError

PHPUnit2_Framework_AssertionFailedError::getLocation()
Returns the location where this failure occured.
PHPUnit2_Framework_AssertionFailedError::toString()
Wrapper for getMessage() which is declared as final.

Class Details

[line 70]
Thrown when an assertion for string equality failed.


[ Top ]


Method Detail

diffEqual   [line 153]

PHPUnit2_Framework_ComparisonFailure diffEqual( mixed $expected, mixed $actual, [string $message = ''])

Figures out which diff class to use for the input types then instantiates that class and returns the object.

Parameters:

mixed   $expected     Expected value retrieved.
mixed   $actual     Actual value retrieved.
string   $message     A string which is prefixed on all returned lines in the difference output.

[ Top ]

diffIdentical   [line 118]

PHPUnit2_Framework_ComparisonFailure diffIdentical( mixed $expected, mixed $actual, [string $message = ''])

Figures out which diff class to use for the input types then instantiates that class and returns the object.

Parameters:

mixed   $expected     Expected value retrieved.
mixed   $actual     Actual value retrieved.
string   $message     A string which is prefixed on all returned lines in the difference output.

[ Top ]

shortenedExport   [line 183]

string shortenedExport( mixed $value)

Exports the value $value to a string but in a shortened form.

Parameters:

mixed   $value     The value to export as string.

[ Top ]

shortenedString   [line 251]

string shortenedString( string $string)

Shortens the string $string and returns it. If the string is already short enough it is returned as it was.

Parameters:

string   $string     The string value which must be shortened.

[ Top ]


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