本文整理汇总了PHP中Course::setCourseName方法的典型用法代码示例。如果您正苦于以下问题:PHP Course::setCourseName方法的具体用法?PHP Course::setCourseName怎么用?PHP Course::setCourseName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Course
的用法示例。
在下文中一共展示了Course::setCourseName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Course
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);
}
示例2: testSetCourseName
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);
}
示例3: testSetCourseName
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);
}
示例4: testSetCourseName
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);
}
示例5: Course
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);
}
示例6: testSetCourseName
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);
}