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

Event Class Reference

Stores test case results event details. More...

Public Member Functions

 __construct (EventType $type, $reason, $message, $actual, $comparison, $file, $line)
 GetType ()
 GetTypeAsString ()
 GetTime ()
 GetReason ()
 GetMessage ()
 GetActualType ()
 GetActualValue ()
 GetComparisonType ()
 GetComparisonValue ()
 GetFile ()
 GetLine ()

Detailed Description

Stores test case results event details.

This class stores details about one event that has occurred during the execution of the test case. There are a variety of events and the $type variable (of type EventType) determines which other of the member variables are significant.

The Get method is used in the generation of the test report.

Definition at line 308 of file php_unit_test.php.


Constructor & Destructor Documentation

__construct ( EventType type,
reason,
message,
actual,
comparison,
file,
line 
)

Constructs the event object.

Parameters:
[in]EventType$typeThe type for the event.
[in]string$reasonThe reason for this event.
[in]string$messageA user defined message for this event.
[in]mixed$actualThe actual value calculated during testing.
[in]mixed$comparisonThe comparison value.
[in]string$fileThe filename where the event occurred.
[in]string$lineThe line number where the event occurred.

Definition at line 360 of file php_unit_test.php.


Member Function Documentation

GetActualType ( )

Returns the type of the actual value.

Returns:
The actual values type in the assert comparison is returned as a string representation.

Definition at line 465 of file php_unit_test.php.

GetActualValue ( )

Returns the actual value.

Returns:
The actual value in the assert comparison is returned as a string representation.

Definition at line 475 of file php_unit_test.php.

GetComparisonType ( )

Returns the type of the comparison value.

Returns:
The comparison values type in the assert comparison is returned as a string representation.

Definition at line 485 of file php_unit_test.php.

GetComparisonValue ( )

Returns the comparison value.

Returns:
The comparison value in the assert comparison is returned as a string representation.

Definition at line 495 of file php_unit_test.php.

GetFile ( )

Returns the filename.

Returns:
The filename of the code where the event occurred.

Definition at line 504 of file php_unit_test.php.

GetLine ( )

Returns line number.

Returns:
The line number in the code where the event occurred.

Definition at line 513 of file php_unit_test.php.

GetMessage ( )

Returns the message

Returns:
Returns the user defined message string for the event.

Definition at line 455 of file php_unit_test.php.

GetReason ( )

Returns the events reason.

Returns:
string The reason for the event.

Definition at line 445 of file php_unit_test.php.

GetTime ( )

Returns the time when the event occurred.

Returns:
The time of the event as string in the format as shown in this example:
  • 03 Apr 07, 12:29:11.804 +0000.

Definition at line 436 of file php_unit_test.php.

GetType ( )

Returns the event type.

Returns:
Returns the event type as an object of type EventType

Definition at line 385 of file php_unit_test.php.

GetTypeAsString ( )

Returns the event type as a string.

Returns:
Returns the event type as a string.

Definition at line 394 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