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):

  • Jan Borsodi <jb at ez.no> Sebastian Bergmann <sb at sebastian-bergmann.de>

Version:

  • Release: @package_version@

Copyright:

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

Variables

Methods


Child classes:

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_Array
Thrown when an assertion for array 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.
  • Author: Jan Borsodi <jb@ez.no> Sebastian Bergmann <sb@sebastian-bergmann.de>
  • Version: Release: @package_version@
  • Copyright: 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
  • Link: http://pear.php.net/package/PHPUnit2
  • Abstract:
  • Since: Class available since Release 2.0.0
  • License: BSD License


[ Top ]


Class Variables

$actual =

[line 82]

Actually retrieved value which does not match $expected.
  • Access: protected

Type:   mixed


[ Top ]

$expected =

[line 76]

Expected value of the retrieval which does not match $actual.
  • Access: protected

Type:   mixed


[ Top ]

$message =

[line 89]

Optional message which is placed in front of the first line returned by toString().
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 99]

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

Initialises with the expected value and the actual value.
  • Access: public

Overridden in child classes as:

PHPUnit2_Framework_ComparisonFailure_Type::__construct()
Initialises with the expected value and the actual value.

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 ]

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.
  • Access: public

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.
  • Access: public

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.
  • Access: public

Parameters:

mixed   $value   —  The value to export as string.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.