本文整理匯總了PHP中Course::setCourseNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP Course::setCourseNumber方法的具體用法?PHP Course::setCourseNumber怎麽用?PHP Course::setCourseNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Course
的用法示例。
在下文中一共展示了Course::setCourseNumber方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testSetCourseNumber
function testSetCourseNumber()
{
//Arrange
$name = "Philosophy 101";
$course_number = "PHIL101";
$test_course = new Course($name, $course_number);
//Act
$test_course->setCourseNumber('PHIL101');
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals('PHIL101', $result);
}
示例2: Course
function test_setCourseNumber()
{
//Arrange
$name = "History";
$course_number = "HIST101";
$test_course = new Course($name, $course_number);
//Act
$test_course->setCourseNumber("ENG500");
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals("ENG500", $result);
}
示例3: Course
function test_setCourseNumber()
{
//Arrange
$course_name = "History";
$id = null;
$course_number = "HIST:101";
$test_course = new Course($course_name, $course_number, $id);
//Act
$test_course->setCourseNumber("BIO:111");
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals("BIO:111", $result);
}
示例4: Course
function test_setCourseNumber()
{
//Arrange
$course_name = "Monster Literature";
$course_number = "ENG304";
$test_course = new Course($course_name, $course_number);
$new_number = "ENG204";
//Act
$test_course->setCourseNumber($new_number);
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals($new_number, $result);
}