Moodle  2.2.1
http://www.collinsharper.com
PHPUnit_TestCase Class Reference

Public Member Functions

 PHPUnit_TestCase ($label=false)
 assertEquals ($first, $second, $message="%s", $delta=0)
 assertNotNull ($value, $message="%s")
 assertNull ($value, $message="%s")
 assertSame (&$first, &$second, $message="%s")
 assertNotSame (&$first, &$second, $message="%s")
 assertTrue ($condition, $message="%s")
 assertFalse ($condition, $message="%s")
 assertRegExp ($pattern, $subject, $message="%s")
 assertType ($value, $type, $message="%s")
 setLooselyTyped ($loosely_typed)
 countTestCases ()
 getName ()
 setName ($name)

Data Fields

 $_loosely_typed

Detailed Description

Definition at line 24 of file pear_test_case.php.


Member Function Documentation

assertEquals ( first,
second,
message = "%s",
delta = 0 
)

Will test straight equality if set to loose typing, or identity if not.

Parameters:
$firstFirst value.
$secondComparison value.
$messageMessage to display.

Definition at line 45 of file pear_test_case.php.

assertFalse ( condition,
message = "%s" 
)

Sends pass if the test condition resolves false, a fail otherwise.

Parameters:
$conditionCondition to test false.
$messageMessage to display.

Definition at line 134 of file pear_test_case.php.

assertNotNull ( value,
message = "%s" 
)

Passes if the value tested is not null.

Parameters:
$valueValue to test against.
$messageMessage to display.

Definition at line 60 of file pear_test_case.php.

assertNotSame ( &$  first,
&$  second,
message = "%s" 
)

In PHP5 the identity test tests for the same object. This is a reference test in PHP4.

Parameters:
$firstFirst object handle.
$secondHopefully a different handle.
$messageMessage to display.

Definition at line 103 of file pear_test_case.php.

Here is the call graph for this function:

assertNull ( value,
message = "%s" 
)

Passes if the value tested is null.

Parameters:
$valueValue to test against.
$messageMessage to display.

Definition at line 70 of file pear_test_case.php.

assertRegExp ( pattern,
subject,
message = "%s" 
)

Tests a regex match. Needs refactoring.

Parameters:
$patternRegex to match.
$subjectString to search in.
$messageMessage to display.

Definition at line 145 of file pear_test_case.php.

assertSame ( &$  first,
&$  second,
message = "%s" 
)

In PHP5 the identity test tests for the same object. This is a reference test in PHP4.

Parameters:
$firstFirst object handle.
$secondHopefully the same handle.
$messageMessage to display.

Definition at line 82 of file pear_test_case.php.

Here is the call graph for this function:

assertTrue ( condition,
message = "%s" 
)

Sends pass if the test condition resolves true, a fail otherwise.

Parameters:
$conditionCondition to test true.
$messageMessage to display.

Definition at line 123 of file pear_test_case.php.

assertType ( value,
type,
message = "%s" 
)

Tests the type of a value.

Parameters:
$valueValue to take type of.
$typeHoped for type.
$messageMessage to display.

Definition at line 156 of file pear_test_case.php.

For progress indication during a test amongst other things.

Returns:
Usually one.

Definition at line 177 of file pear_test_case.php.

getName ( )

Accessor for name, normally just the class name.

Definition at line 186 of file pear_test_case.php.

PHPUnit_TestCase ( label = false)

Constructor. Sets the test name.

Parameters:
$labelTest name to display.

Definition at line 32 of file pear_test_case.php.

setLooselyTyped ( loosely_typed)

Sets equality operation to act as a simple equal comparison only, allowing a broader range of matches.

Parameters:
$loosely_typedTrue for broader comparison.

Definition at line 167 of file pear_test_case.php.

setName ( name)

Does nothing. For compatibility only.

Parameters:
$nameDummy

Definition at line 195 of file pear_test_case.php.


Field Documentation

$_loosely_typed

Definition at line 25 of file pear_test_case.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations