当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::getStudentName方法代码示例

本文整理汇总了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);
 }
开发者ID:julianstewart,项目名称:university_registrar,代码行数:9,代码来源:StudentTest.php

示例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);
 }
开发者ID:bencasalino,项目名称:registrar-afternoon,代码行数:11,代码来源:StudentTest.php

示例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);
 }
开发者ID:ashlinaronin,项目名称:back2school_fam,代码行数:11,代码来源:StudentTest.php

示例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);
 }
开发者ID:juliocesardiaz,项目名称:UniRegisSwitch,代码行数:12,代码来源:StudentTest.php

示例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);
 }
开发者ID:kylepratuch,项目名称:registrar,代码行数:13,代码来源:StudentTest.php

示例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);
 }
开发者ID:CharlesAMoss,项目名称:epic_Registrar,代码行数:13,代码来源:StudentTest.php

示例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);
 }
开发者ID:jschold,项目名称:University_Registrar,代码行数:17,代码来源:StudentTest.php

示例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());
 }
开发者ID:JordanNavratil,项目名称:University_Registrar2,代码行数:18,代码来源:StudentTest.php

示例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());
 }
开发者ID:kennygrage,项目名称:epicUniversityFromPartners,代码行数:14,代码来源:StudentTest.php

示例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());
 }
开发者ID:kevintokheim,项目名称:University_Registrar,代码行数:14,代码来源:StudentTest.php


注:本文中的Student::getStudentName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。