function test_setCourseName()
 {
     //Arrange
     $course_name = "History";
     $id = null;
     $course_number = "HIST:101";
     $test_course = new Course($course_name, $course_number, $id);
     //Act
     $test_course->setCourseName("Intro to History");
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals("Intro to History", $result);
 }
 function testSetCourseName()
 {
     //Arrange
     $course_name = "History";
     $crn = "HIST101";
     $id = 1;
     $test_course = new Course($course_name, $crn, $id);
     //Act
     $test_course->setCourseName("Economics");
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals("Economics", $result);
 }
Beispiel #3
0
 function testSetCourseName()
 {
     //Arrange
     $course_name = "History";
     $course_number = "101";
     $course_id = 1;
     $test_course = new Course($course_name, $course_number, $course_id);
     //Act
     $test_course->setCourseName($course_name);
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals("History", $result);
 }
Beispiel #4
0
 function testSetCourseName()
 {
     //Arrange
     $course_name = "History 110";
     $id = null;
     $course_number = "HST110";
     $test_course = new Course($course_name, $id, $course_number);
     //Act
     $test_course->setCourseName("Math 101");
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals("Math 101", $result);
 }
 function test_setCourseName()
 {
     //Arrange
     $course_name = "Monster Literature";
     $course_number = "ENG304";
     $test_course = new Course($course_name, $course_number);
     $new_name = "Erotica Film";
     //Act
     $test_course->setCourseName($new_name);
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals($new_name, $result);
 }
Beispiel #6
0
 function testSetCourseName()
 {
     //Arrange
     $course_name = "Intro to Art";
     $course_number = "ART101";
     $id = 1;
     $test_course = new Course($course_name, $course_number, $id);
     $test_course->save();
     //Act
     $test_course->setCourseName("Intro to Fine Arts");
     $result = $test_course->getCourseName();
     //Assert
     $this->assertEquals("Intro to Fine Arts", $result);
 }