Class TestCompetitorAffilListFormatter_textFormattedOutput

Description

CompetitorAffilListFormatter, 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 387)

UnitTestCase
   |
   --TestCompetitorAffilListFormatter_textFormattedOutput
Variable Summary
Method Summary
Variables
CompetitorListFormatter $formatter (line 412)

An instance of the class being tested

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

The header of the list

QueryResult $oneItemResult (line 407)

A sample (stubbed) QueryResult

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

A sample row

string $school1 = "MIT" (line 397)

A school

Methods
Constructor TestCompetitorAffilListFormatter_textFormattedOutput (line 414)
TestCompetitorAffilListFormatter_textFormattedOutput TestCompetitorAffilListFormatter_textFormattedOutput ()
setup (line 421)

Create the test fixture.

void setup ()
TestInductiveStepDifferentAffil (line 534)

Tests the variable length list, when the leader's school changes

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 TestInductiveStepDifferentAffil ()
TestInductiveStepDifferentLeaderSameSchool (line 459)

Tests the variable length list, schools match and leaders 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 TestInductiveStepDifferentLeaderSameSchool ()
TestInductiveStepSameLeader (line 502)

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 443)

Tests the one item list, base case.

void TestOneEntry ()
TestZeroEntries (line 431)

Tests the empty list.

void TestZeroEntries ()

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