Class TestCompetitorAffilListFormatter_tabbedOutput

Description

CompetitorAffilListFormatter, tabbbed output test.

Tests that 0,1, and N+1 length lists print properly when using tabs to delimit the output and no other formatting is applied to the list items.

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

UnitTestCase
   |
   --TestCompetitorAffilListFormatter_tabbedOutput
Variable Summary
Method Summary
 TestCompetitorAffilListFormatter_tabbedOutput TestCompetitorAffilListFormatter_tabbedOutput ()
 void setup ()
 void TestOneEntry ()
 void TestZeroEntries ()
Variables
CompetitorAffilListFormatter $formatter (line 289)

An instance of the class being tested

string $listName = "LIST OF COMPETITORS BY AFFILIATION" (line 269)

The header of the list

QueryResult $oneItemResult (line 284)

A sample (stubbed) QueryResult

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

A sample row

string $school1 = "MIT" (line 274)

A school

Methods
Constructor TestCompetitorAffilListFormatter_tabbedOutput (line 291)
TestCompetitorAffilListFormatter_tabbedOutput TestCompetitorAffilListFormatter_tabbedOutput ()
setup (line 298)

Create the test fixture.

void setup ()
TestInductiveLeap_different (line 364)

Tests the variable length list (different school branch).

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.

There are two seperate inductive steps to test:

  • Same schools as previous row
  • Different schools as previous row

  • todo: Refactor after simpletest allows cloning/overriding of mocks
void TestInductiveLeap_different ()
TestInductiveLeap_same (line 339)

Tests the variable length list (same school branch).

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.

There are two seperate inductive steps to test:

  • Same schools as previous row
  • Different schools as previous row

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

Tests the one item list, base case.

void TestOneEntry ()
TestZeroEntries (line 308)

Tests the empty list.

void TestZeroEntries ()

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