本文整理汇总了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();
}