Esempio n. 1
0
 public function testremoveUneededColumns()
 {
     $arrayIn = array("Unneeded_1" => "aa", "tA_id" => "a", "tA_S_ID" => "b", "tA_StudentName" => "c", "tG_AssignmentName" => "d", "Unneeded_2" => "e");
     $classInstance = new tutor\src\classes\AssignmentsClass();
     $returned_array = $classInstance->removeUnneededColumns($arrayIn);
     $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));
     //$log_file = fopen("/var/www/html/jimfuqua/tutor/logs/ACT_testremoveUnneededColumns.log", "w");
     //$v = var_export($returned_array, true);
     //$string = __LINE__.' $returned_array = '.$v."\n\n";
     //fwrite($log_file, $string);
 }