本文整理汇总了PHP中Student::getStudentName方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::getStudentName方法的具体用法?PHP Student::getStudentName怎么用?PHP Student::getStudentName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Student
的用法示例。
在下文中一共展示了Student::getStudentName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetStudentName
function testGetStudentName()
{
$student_name = "John Doe";
$enrollment_date = "2015-09-01";
$id = 1;
$test_student = new Student($student_name, $enrollment_date, $id);
$result = $test_student->getStudentName();
$this->assertEquals($student_name, $result);
}
示例2: testGetStudentName
function testGetStudentName()
{
//Arrange
$student_name = "Johnny Mcfly";
$date_enrollment = "2014-08-08";
$test_student = new Student($student_name, $date_enrollment);
//Act
$result = $test_student->getStudentName();
//Assert
$this->assertEquals($student_name, $result);
}
示例3: Student
function test_getStudentName()
{
//Arrange
$name = "Ashlin Aronin";
$enrollment_date = "2014-08-09";
$test_student = new Student($name, $enrollment_date);
//Act
$result = $test_student->getStudentName();
//Assert
$this->assertEquals($name, $result);
}
示例4: testGetstudentName
function testGetstudentName()
{
//Arrange
$student_name = "History";
$student_number = "101";
$student_id = 1;
$test_student = new Student($student_name, $student_number, $student_id);
//Act
$result = $test_student->getStudentName();
//Assert
$this->assertEquals($student_name, $result);
}
示例5: Student
function test_getStudentName()
{
//Arrange
$student_name = "Bob";
$enroll_date = "2012-10-20";
$id = 1;
$test_student = new Student($student_name, $enroll_date, $id);
$test_student->save();
//Act
$result = $test_student->getStudentName();
//Assert
$this->assertEquals($result, $student_name);
}
示例6: Student
function test_student_setStudentName()
{
//Arrange
$name = "Bobby";
$id = 1;
$enroll = "2015-10-10";
$test_student = new Student($name, $id, $enroll);
//Act
$test_student->setStudentName("Ricky");
$result = $test_student->getStudentName();
//Assert
$this->assertEquals("Ricky", $result);
}
示例7: testSetStudentName
function testSetStudentName()
{
//Arrange
$name = "Coding 101";
$enrollment_date = '0000-00-00';
$id = null;
$test_course = new Course($name, $id);
$test_course->save();
$student_name = "Aladdin";
$course_id = $test_course->getId();
$test_course = new Student($student_name, $id, $enrollment_date, $course_id);
//Act
$test_course->setStudentName("Jafar");
$result = $test_course->getStudentName();
//Assert
$this->assertEquals("Jafar", $result);
}
示例8: testUpdate
function testUpdate()
{
//Arrange
$name = "Math";
$date = '0000-00-00';
$id = null;
$test_course = new Course($name, $id);
$test_course->save();
$student_name = "Student1";
$course_id = $test_course->getId();
$test_student = new Student($student_name, $id, $date, $course_id);
$test_student->save();
$new_student_name = "Student2";
//Act
$test_student->update($new_student_name);
//Assert
$this->assertEquals("Student2", $test_student->getStudentName());
}
示例9: testUpdate
function testUpdate()
{
//Arrange
$student_name = "Paco";
$id = 1;
$enroll_date = "2015-08-29";
$test_student = new Student($student_name, $enroll_date, $id);
$test_student->save();
$new_student_name = "Pablo";
//Act
$test_student->update($new_student_name);
//Assert
$this->assertEquals("Pablo", $test_student->getStudentName());
}
示例10: Student
function test_update()
{
//Arrange
$student_name = "Joker";
$enrollment_date = "6000-12-14";
$id = 1;
$student = new Student($student_name, $enrollment_date, $id);
$student->save();
$new_student_name = "Spot";
//Act
$student->update($new_student_name);
//Assert
$this->assertEquals("Spot", $student->getStudentName());
}