本文整理匯總了PHP中Course::getCourseNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP Course::getCourseNumber方法的具體用法?PHP Course::getCourseNumber怎麽用?PHP Course::getCourseNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Course
的用法示例。
在下文中一共展示了Course::getCourseNumber方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetCourseNumber
function testGetCourseNumber()
{
$name = "History";
$course_number = "HIST100";
$test_course = new Course($name, $course_number);
$result = $test_course->getCourseNumber();
$this->assertEquals($course_number, $result);
}
示例2: Course
function test_getCourseNumber()
{
//Arrange
$name = "History";
$course_number = "HIST101";
$test_course = new Course($name, $course_number);
//Act
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals($course_number, $result);
}
示例3: testGetCourseNumber
function testGetCourseNumber()
{
//Arrange
$course_name = "HISTORY";
$number = 101;
$test_course = new Course($course_name, $number);
//Act
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals($number, $result);
}
示例4: Course
function test_getCourseNumber()
{
//Arrange
$course_name = "Monster Literature";
$course_number = "ENG304";
$test_course = new Course($course_name, $course_number);
//Act
$result = $test_course->getCourseNumber();
//Assert
$this->assertEquals($course_number, $result);
}
示例5: testUpdateCourseNumber
function testUpdateCourseNumber()
{
//Arrange
$name = "Psychology 101";
$course_number = "PSY101";
$test_course = new Course($name, $course_number);
$test_course->save();
$new_course_number = "PSY101A";
//Act
$test_course->updateCourseNumber($new_course_number);
//Assert
$this->assertEquals("PSY101A", $test_course->getCourseNumber());
}
示例6: testUpdateCourseNumber
function testUpdateCourseNumber()
{
//Arrange
$course_name = "Chemistry";
$course_id = 1;
$course_number = "1000";
$test_course = new Course($course_name, $course_number, $course_id);
$test_course->save();
$new_course_number = "1001";
//Act
$test_course->updateCourseNumber($new_course_number);
//Assert
$this->assertEquals("1001", $test_course->getCourseNumber());
}
示例7: setCourse
/**
* @param Course $Course
*/
public function setCourse($Course)
{
$this->Course = $Course;
$this->courseNumber = $Course->getCourseNumber();
}