Class TestCompetitorListFormatter_textFormattedOutput

Description

CompetitorListFormatter, pre-formatted text output test.

Tests that 0,1, and N+1 length lists print properly when using specific pre-determined format conventions.

Located in /tests/unit-tests/classes/ListFormatters/CompetitorListFormatter.php (line 125)

UnitTestCase
   |
   --TestCompetitorListFormatter_textFormattedOutput
Variable Summary
Method Summary
 TestCompetitorListFormatter_textFormattedOutput TestCompetitorListFormatter_textFormattedOutput ()
 void setup ()
 void TestOneEntry ()
 void TestZeroEntries ()
Variables
CompetitorListFormatter $formatter (line 145)

An instance of the class being tested

string $listName = "List of Competitors, by Competitor Number" (line 130)

The header of the list

QueryResult $oneItemResult (line 140)

A sample (stubbed) QueryResult

array $row1 = array(100,'Eric','Nielsen','MIT','His','Partner','MIT') (line 135)

A sample row

Methods
Constructor TestCompetitorListFormatter_textFormattedOutput (line 147)
TestCompetitorListFormatter_textFormattedOutput TestCompetitorListFormatter_textFormattedOutput ()
setup (line 154)

Create the test fixture.

void setup ()
TestInductiveStepDifferentLeader (line 191)

Tests the variable length list, when the leaders are disjoint

Notice that this is an inductive proof, we assume the correct behavoir, add a new row and compare the new result to the old result+expected delta.

  • todo: Refactor after simpletest allows cloning/overriding of mocks
void TestInductiveStepDifferentLeader ()
TestInductiveStepSameLeader (line 239)

Tests the variable length list, when the leaders are identical

Notice that this is an inductive proof, we assume the correct behavoir, add a new row and compare the new result to the old result+expected delta.

  • todo: Refactor after simpletest allows cloning/overriding of mocks
void TestInductiveStepSameLeader ()
TestOneEntry (line 176)

Tests the one item list, base case.

void TestOneEntry ()
TestZeroEntries (line 164)

Tests the empty list.

void TestZeroEntries ()

Documentation generated on Tue, 25 Apr 2006 13:00:30 -0400 by phpDocumentor 1.3.0RC3