[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/tests/test_tools/simpletest/ -> dumper.php (sommaire)

base include file for SimpleTest

Version: $Id: dumper.php 1526 2006-11-28 23:34:00Z wei $
Poids: 402 lignes (16 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

SimpleDumper:: (19 méthodes):
  describeValue()
  getType()
  describeDifference()
  _isTypeMatch()
  clipString()
  _describeGenericDifference()
  _describeNullDifference()
  _describeBooleanDifference()
  _describeStringDifference()
  _describeIntegerDifference()
  _describeFloatDifference()
  _describeArrayDifference()
  _isMatchingKeys()
  _describeResourceDifference()
  _describeObjectDifference()
  _stringDiffersAt()
  dump()
  getFormattedAssertionLine()
  _stackFrameIsAnAssertion()


Classe: SimpleDumper  - X-Ref

Displays variables as text and does diffs.

describeValue($value)   X-Ref
Renders a variable in a shorter form than print_r().

param: mixed $value      Variable to render as a string.
return: string           Human readable string form.

getType($value)   X-Ref
Gets the string representation of a type.

param: mixed $value    Variable to check against.
return: string         Type.

describeDifference($first, $second, $identical = false)   X-Ref
Creates a human readable description of the
difference between two variables. Uses a
dynamic call.

param: mixed $first        First variable.
param: mixed $second       Value to compare with.
param: boolean $identical  If true then type anomolies count.
return: string             Description of difference.

_isTypeMatch($first, $second)   X-Ref
Tests to see if types match.

param: mixed $first        First variable.
param: mixed $second       Value to compare with.
return: boolean            True if matches.

clipString($value, $size, $position = 0)   X-Ref
Clips a string to a maximum length.

param: string $value         String to truncate.
param: integer $size         Minimum string size to show.
param: integer $position     Centre of string section.
return: string               Shortened version.

_describeGenericDifference($first, $second)   X-Ref
Creates a human readable description of the
difference between two variables. The minimal
version.

param: null $first          First value.
param: mixed $second        Value to compare with.
return: string              Human readable description.

_describeNullDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between a null and another variable.

param: null $first          First null.
param: mixed $second        Null to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_describeBooleanDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between a boolean and another variable.

param: boolean $first       First boolean.
param: mixed $second        Boolean to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_describeStringDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between a string and another variable.

param: string $first        First string.
param: mixed $second        String to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_describeIntegerDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between an integer and another variable.

param: integer $first       First number.
param: mixed $second        Number to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_describeFloatDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between two floating point numbers.

param: float $first         First float.
param: mixed $second        Float to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_describeArrayDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between two arrays.

param: array $first         First array.
param: mixed $second        Array to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_isMatchingKeys($first, $second, $identical)   X-Ref
Compares two arrays to see if their key lists match.
For an identical match, the ordering and types of the keys
is significant.

param: array $first         First array.
param: array $second        Array to compare with.
param: boolean $identical   If true then type anomolies count.
return: boolean             True if matching.

_describeResourceDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between a resource and another variable.

param: resource $first       First resource.
param: mixed $second         Resource to compare with.
param: boolean $identical    If true then type anomolies count.
return: string              Human readable description.

_describeObjectDifference($first, $second, $identical)   X-Ref
Creates a human readable description of the
difference between two objects.

param: object $first        First object.
param: mixed $second        Object to compare with.
param: boolean $identical   If true then type anomolies count.
return: string              Human readable description.

_stringDiffersAt($first, $second)   X-Ref
Find the first character position that differs
in two strings by binary chop.

param: string $first        First string.
param: string $second       String to compare with.
return: integer             Position of first differing

dump($variable)   X-Ref
Sends a formatted dump of a variable to a string.

param: mixed $variable    Variable to display.
return: string            Output from print_r().

getFormattedAssertionLine($stack)   X-Ref
Extracts the last assertion that was not within
Simpletest itself. The name must start with "assert".

param: array $stack      List of stack frames.

_stackFrameIsAnAssertion($frame)   X-Ref
Tries to determine if the method call is an assertion.

param: array $frame     PHP stack frame.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7