Exemple #1
0
 /**
  * Test test "normalizePercentTimeTo100Percent()" in Assignments.class.inc
  *
  * A *description*, that can span multiple lines, to go _in-depth_ into the details of this element
  * and to provide some background information or textual references.
  *
  * @return void
  */
 public function testgetAssignmentByAssignmentID()
 {
     $this->testbuildArray();
     // reset myArray to origninal values.
     $classInstance = new tutor\src\classes\AssignmentsClass();
     $classInstance->delRowsByStudentId($this->myArray['tA_S_ID']);
     // insure no previous lessons for this student.
     $this->myArray['tA_id'] = '88888';
     $this->myArray['tA_StudentName'] = 'John Doe III';
     $result = $classInstance->insertRecord($this->myArray);
     $this->assertTrue($result === 1);
     // Returns array or FALSE
     $result = $classInstance->getAssignmentByAssignmentID('88888');
     $this->assertTrue(is_array($result) === TRUE);
     if (is_array($result) === TRUE) {
         $this->assertTrue($result['tA_StudentName'] === 'John Doe III');
         $this->assertTrue($result['tA_id'] === '88888');
     }
     $classInstance->delRowsByStudentId($this->myArray['tA_S_ID']);
 }