本文整理匯總了PHP中Student::getEnrollmentDate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Student::getEnrollmentDate方法的具體用法?PHP Student::getEnrollmentDate怎麽用?PHP Student::getEnrollmentDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Student
的用法示例。
在下文中一共展示了Student::getEnrollmentDate方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetEnrollmentDate
function testGetEnrollmentDate()
{
$name = "Bob";
$enrollment_date = "2015-01-01";
$test_student = new Student($name, $enrollment_date);
$result = $test_student->getEnrollmentDate();
$this->assertEquals($enrollment_date, $result);
}
示例2: testGetEnrollmentDate
function testGetEnrollmentDate()
{
$student_name = "John Doe";
$enrollment_date = "2015-09-01";
$id = 1;
$test_student = new Student($student_name, $enrollment_date, $id);
$result = $test_student->getEnrollmentDate();
$this->assertEquals($enrollment_date, $result);
}
示例3: Student
function test_getEnrollmentDate()
{
//Arrange
$name = "Sandra Maley";
$enrollment_date = "2015-06-21";
$test_student = new Student($name, $enrollment_date);
//Act
$result = $test_student->getEnrollmentDate();
//Assert
$this->assertEquals($enrollment_date, $result);
}
示例4: Student
function test_getEnrollment_date()
{
//Arrange
$name = "John";
$enrollment_date = "05-05-05";
$id = 56;
$test_enrollment_date = new Student($name, $enrollment_date, $id);
//Act
$result = $test_enrollment_date->getEnrollmentDate();
//Assert
$this->assertEquals($enrollment_date, $result);
}
示例5: testSetEnrollmentDate
function testSetEnrollmentDate()
{
//Arrange
$id = null;
$name = "Micah";
$enrollment_date = "2015-08-28";
$test_student = new Student($id, $name, $enrollment_date);
//Act
$test_student->setEnrollmentDate("2014-08-10");
$result = $test_student->getEnrollmentDate();
//Assert
$this->assertEquals("2014-08-10", $result);
}
示例6: testUpdateEnrollmentDate
function testUpdateEnrollmentDate()
{
//Arrange
$name = "bob";
$enrollment_date = "2015-09-16";
$test_student = new Student($name, $enrollment_date);
$test_student->save();
$new_date = "2015-02-12";
//Act
$test_student->updateEnrollmentDate($new_date);
//Assert
$this->assertEquals("2015-02-12", $test_student->getEnrollmentDate());
}