PHP Unit Testing Framework 1
A Unit testing framework for PHP.
Public Member Functions | Protected Attributes

TestCaseResultConstructor Class Reference

Constructs test case results. More...

Inheritance diagram for TestCaseResultConstructor:

Public Member Functions

 __construct ($name, $id)
 AddDetail (EventType $type, $reason, $message= '', $actual= '', $comparison= '')
 AddException ($place, Exception &$exception)
 AddTimeStamp (EventType $type)
 AddMessage ($message, $type)
 SetDetails ($name, $id, $description)

Protected Attributes

 True if the test passes, false otherwise.
 Test case ID.
 A name for the test case.
 And a description.
 List of events for the result of this rest case.

Detailed Description

Constructs test case results.

A class to hide the construction of the test case results from the TestRunner::Report function. This is to enable external developer of a TestRunner to be decoupled from the internals of this framework.

Definition at line 609 of file php_unit_test.php.

Constructor & Destructor Documentation

__construct ( name,

Constructs the TestCaseResultConstructor.

[in]string$nameThe name for the test case.
[in]string$idTest case ID.

Reimplemented from TestCaseResult.

Definition at line 622 of file php_unit_test.php.

Member Function Documentation

AddDetail ( EventType type,
message = '',
actual = '',
comparison = '' 

Adds a event to the test case result

[in]EventType$typeThe event type.
[in]string$reasonThe reason for this event (string).
[in]string$messageA user defined message (string). Enables commentary.
[in]mixed$actualThe actual value computed when running the test case.
[in]mixed$comparisonThe comparison value used in the test case.

Definition at line 635 of file php_unit_test.php.

AddException ( place,
Exception &$  exception 

Adds a exception to the test case result.

[in]string$placeThe phase in the test case where exception occurred.
[in]Exception$exceptionThe exception.

Definition at line 674 of file php_unit_test.php.

AddMessage ( message,

Adds a message to the test case result.

[in]string$messageThe text for the message.
[in]EventType$typeThe type of the Message.

Definition at line 702 of file php_unit_test.php.

AddTimeStamp ( EventType type)

Adds a time stamp to the test case result to indicate a stage in the test case (e.g. start/end of set up).

[in]EventType$typeThe type of time stamp to be added.

Definition at line 692 of file php_unit_test.php.

SetDetails ( name,

Sets the test case name, ID and description.

[in]string$nameThe name for the test case.
[in]string$idThe ID for the test case.
[in]string$descriptionThe description for the test case.

Definition at line 720 of file php_unit_test.php.

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

© 2011, Ed Heal