Example #1
0
 /**
  * End resetMyArray().
  */
 public function testremoveUneededColumns()
 {
     // $log_file = fopen("/var/www/html/jimfuqua/tutorW/logs/
     // ACT_testremoveUnneededColumns.log", "w");.
     $array_in = array("Unneeded_1" => "aa", "tA_id" => "a", "tA_S_ID" => "b", "tA_StudentName" => "c", "tG_AssignmentName" => "d", "Unneeded_2" => "e");
     $ac_class_instance = new AssignmentsClass();
     $returned_array = $ac_class_instance->removeUnneededColumns($array_in);
     // $v = var_export($returned_array, true);
     // $string  = __LINE__.' $returned_array = '.$v."\n\n";
     // fwrite($log_file, $string);.
     $this->assertTrue(count($returned_array) === 4);
     $this->assertFalse(array_key_exists("Unneeded_1", $returned_array));
     $this->assertFalse(array_key_exists("Unneeded_2", $returned_array));
     $this->assertTrue(array_key_exists("tA_id", $returned_array));
     $this->assertTrue(array_key_exists("tA_S_ID", $returned_array));
     $this->assertTrue(array_key_exists("tA_StudentName", $returned_array));
     $this->assertTrue(array_key_exists("tG_AssignmentName", $returned_array));
     // $v = var_export($returned_array, true);
     // $string = __LINE__.' $returned_array = '.$v."\n\n";
     // fwrite($log_file, $string);.
 }