DrupalReporter Class Reference

Inheritance diagram for DrupalReporter:
[legend]
Collaboration diagram for DrupalReporter:
[legend]

List of all members.


Public Member Functions

 DrupalReporter ($character_set= 'ISO-8859-1')
 paintHeader ($test_name)
 paintFooter ($test_name)
 paintPass ($message, $group)
 paintFail ($message, $group)
 paintError ($message)
 paintGroupStart ($test_name, $size, $extra= '')
 paintCaseStart ($test_name)
 paintGroupEnd ($test_name)
 paintCaseEnd ($test_name)
 getOutput ()
 writeToLastField (&$form, $attr, $keys)
 writeContent ($msg, $weight=NULL, $class= 'simpletest')
 getParentWeight ($form=NULL, $keys=NULL)

Public Attributes

 $_output_error = ''
 $_character_set
 $_fails_stack = array(0)
 $_exceptions_stack = array(0)
 $_passes_stack = array(0)
 $_progress_stack = array(0)
 $test_info_stack = array()
 $_output_stack_id = -1
 $form
 $form_depth = array()
 $current_field_set = array()
 $content_count = 0
 $weight = -10
 $test_stack = array()


Detailed Description

Minimal drupal displayer. Accumulates output to $_output. Based on HtmlReporter by Marcus Baker

Definition at line 8 of file drupal_reporter.php.


Member Function Documentation

DrupalReporter::DrupalReporter ( character_set = 'ISO-8859-1'  ) 

Definition at line 24 of file drupal_reporter.php.

References drupal_add_css(), drupal_get_path(), and SimpleReporter::SimpleReporter().

Here is the call graph for this function:

DrupalReporter::paintHeader ( test_name  ) 

Paints the top of the web page setting the title to the name of the starting test.

Parameters:
string $test_name Name class of test. public

Reimplemented from SimpleReporter.

Definition at line 36 of file drupal_reporter.php.

DrupalReporter::paintFooter ( test_name  ) 

Paints the end of the test with a summary of the passes and failures.

Parameters:
string $test_name Name class of test. public

Reimplemented from SimpleReporter.

Definition at line 46 of file drupal_reporter.php.

References SimpleScorer::getExceptionCount(), SimpleScorer::getFailCount(), SimpleScorer::getPassCount(), and writeContent().

Here is the call graph for this function:

DrupalReporter::paintPass ( message,
group 
)

Paints the test passes

Parameters:
string $message Failure message displayed in the context of the other tests. public

Definition at line 58 of file drupal_reporter.php.

References t(), and theme().

Here is the call graph for this function:

DrupalReporter::paintFail ( message,
group 
)

Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level test.

Parameters:
string $message Failure message displayed in the context of the other tests. public

Definition at line 77 of file drupal_reporter.php.

References t(), and theme().

Here is the call graph for this function:

DrupalReporter::paintError ( message  ) 

Paints a PHP error or exception.

Parameters:
string $message Message is ignored. public

Reimplemented from SimpleScorer.

Definition at line 94 of file drupal_reporter.php.

References t(), and theme().

Here is the call graph for this function:

DrupalReporter::paintGroupStart ( test_name,
size,
extra = '' 
)

Paints the start of a group test. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.

Parameters:
string $test_name Name of test that is starting.
integer $size Number of test cases starting. public

Definition at line 111 of file drupal_reporter.php.

References getParentWeight(), writeContent(), and writeToLastField().

Referenced by paintCaseStart().

Here is the call graph for this function:

DrupalReporter::paintCaseStart ( test_name  ) 

Paints the start of a test case. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.

Parameters:
string $test_name Name of test that is starting. public

Reimplemented from SimpleReporter.

Definition at line 139 of file drupal_reporter.php.

References paintGroupStart().

Here is the call graph for this function:

DrupalReporter::paintGroupEnd ( test_name  ) 

Paints the end of a group test. Will paint the page footer if the stack of tests has unwound.

Parameters:
string $test_name Name of test that is ending.
integer $progress Number of test cases ending. public

Reimplemented from SimpleReporter.

Definition at line 152 of file drupal_reporter.php.

References format_plural(), SimpleScorer::getExceptionCount(), SimpleScorer::getFailCount(), getParentWeight(), SimpleScorer::getPassCount(), SimpleReporter::getTestCaseProgress(), theme(), writeContent(), and writeToLastField().

Referenced by paintCaseEnd().

Here is the call graph for this function:

DrupalReporter::paintCaseEnd ( test_name  ) 

Paints the end of a test case. Will paint the page footer if the stack of tests has unwound.

Parameters:
string $test_name Name of test that is ending. public

Reimplemented from SimpleReporter.

Definition at line 189 of file drupal_reporter.php.

References paintGroupEnd().

Here is the call graph for this function:

DrupalReporter::getOutput (  ) 

Could be extended to show more headers or whatever?

Definition at line 196 of file drupal_reporter.php.

References drupal_get_form().

Here is the call graph for this function:

DrupalReporter::writeToLastField ( &$  form,
attr,
keys 
)

Recursive function that writes attr to the deepest array

Definition at line 203 of file drupal_reporter.php.

References $form, and $value.

Referenced by paintGroupEnd(), paintGroupStart(), and writeContent().

DrupalReporter::writeContent ( msg,
weight = NULL,
class = 'simpletest' 
)

writes $msg into the deepest fieldset

Parameters:
$msg content to write

Definition at line 225 of file drupal_reporter.php.

References $weight, and writeToLastField().

Referenced by paintFooter(), paintGroupEnd(), and paintGroupStart().

Here is the call graph for this function:

DrupalReporter::getParentWeight ( form = NULL,
keys = NULL 
)

Retrieves weight of the currently deepest fieldset

Definition at line 239 of file drupal_reporter.php.

References $form, and $value.

Referenced by paintGroupEnd(), and paintGroupStart().


Member Data Documentation

DrupalReporter::$_output_error = ''

Definition at line 9 of file drupal_reporter.php.

DrupalReporter::$_character_set

Definition at line 10 of file drupal_reporter.php.

DrupalReporter::$_fails_stack = array(0)

Definition at line 11 of file drupal_reporter.php.

DrupalReporter::$_exceptions_stack = array(0)

Definition at line 12 of file drupal_reporter.php.

DrupalReporter::$_passes_stack = array(0)

Definition at line 13 of file drupal_reporter.php.

DrupalReporter::$_progress_stack = array(0)

Definition at line 14 of file drupal_reporter.php.

DrupalReporter::$test_info_stack = array()

Definition at line 15 of file drupal_reporter.php.

DrupalReporter::$_output_stack_id = -1

Definition at line 16 of file drupal_reporter.php.

DrupalReporter::$form

Definition at line 17 of file drupal_reporter.php.

Referenced by getParentWeight(), and writeToLastField().

DrupalReporter::$form_depth = array()

Definition at line 18 of file drupal_reporter.php.

DrupalReporter::$current_field_set = array()

Definition at line 19 of file drupal_reporter.php.

DrupalReporter::$content_count = 0

Definition at line 20 of file drupal_reporter.php.

DrupalReporter::$weight = -10

Definition at line 21 of file drupal_reporter.php.

Referenced by writeContent().

DrupalReporter::$test_stack = array()

Definition at line 22 of file drupal_reporter.php.


The documentation for this class was generated from the following file:

Generated on Mon Jun 2 15:09:05 2008 for SimpleTest by  1.5.5