Example #1
0
 /**
  * Test the function that calculates the length of the headers, if this is correct our display will always be ok
  *
  * @return void
  * @author Dan Cox
  */
 public function test_calculateLength()
 {
     $table = new Table();
     $testArr = array(0 => array('Header1' => 'value', 'LongerHeader2' => 'value2'), 1 => array('Header1' => 'longer val', 'LongerHeader2' => ''), 2 => array('Header1' => 'value', 'LongerHeader2' => 'testvalue'));
     $lengths = $table->calcLength($testArr);
     $this->assertEquals(10, $lengths['Header1']);
     $this->assertEquals(13, $lengths['LongerHeader2']);
 }