Do nothing constructor.
SimpleDumper
SimpleDumper
()
Clips a string to a maximum length.
string
clipString
(string $value, integer $size, integer $position)
-
string
$value: String to truncate.
-
integer
$size: Minimum string size to show.
-
integer
$position: Centre of string section.
Creates a human readable description of the difference between two variables. Uses a dynamic call.
string
describeDifference
(mixed $first, mixed $second, [boolean $identical = false])
-
mixed
$first: First variable.
-
mixed
$second: Value to compare with.
-
boolean
$identical: If true then type anomolies count.
Renders a variable in a shorter form than print_r().
string
describeValue
(mixed $value)
-
mixed
$value: Variable to render as a string.
Sends a formatted dump of a variable to a string.
string
dump
(mixed $variable)
-
mixed
$variable: Variable to display.
Extracts the last assertion that was not within Simpletest itself.
void
getFormattedAssertionLine
(array $stack, [string $format = '%d'])
-
array
$stack: List of stack frames.
-
string
$format: String formatting.
Gets the string representation of a type.
string
getType
(mixed $value)
-
mixed
$value: Variable to check against.
Creates a human readable description of the difference between two arrays.
string
_describeArrayDifference
(array $first, mixed $second, boolean $identical)
-
array
$first: First array.
-
mixed
$second: Array to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a boolean and another variable.
string
_describeBooleanDifference
(boolean $first, mixed $second, boolean $identical)
-
boolean
$first: First boolean.
-
mixed
$second: Boolean to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two floating point numbers.
string
_describeFloatDifference
(float $first, mixed $second, boolean $identical)
-
float
$first: First float.
-
mixed
$second: Float to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between an integer and another variable.
string
_describeIntegerDifference
(integer $first, mixed $second, boolean $identical)
-
integer
$first: First number.
-
mixed
$second: Number to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a null and another variable.
string
_describeNullDifference
(null $first, mixed $second, boolean $identical)
-
null
$first: First null.
-
mixed
$second: Null to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two objects.
string
_describeObjectDifference
(object $first, mixed $second, boolean $identical)
-
object
$first: First object.
-
mixed
$second: Object to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a resource and another variable.
string
_describeResourceDifference
(resource $first, mixed $second, boolean $identical)
-
resource
$first: First resource.
-
mixed
$second: Resource to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a string and another variable.
string
_describeStringDifference
(string $first, mixed $second, boolean $identical)
-
string
$first: First string.
-
mixed
$second: String to compare with.
-
boolean
$identical: If true then type anomolies count.
Tests to see if types match.
boolean
_isTypeMatch
(mixed $first, mixed $second)
-
mixed
$first: First variable.
-
mixed
$second: Value to compare with.
Find the first character position that differs in two strings by binary chop.
integer
_stringDiffersAt
(string $first, string $second)
-
string
$first: First string.
-
string
$second: String to compare with.