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


PHP Course::getName方法代码示例

本文整理汇总了PHP中Course::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Course::getName方法的具体用法?PHP Course::getName怎么用?PHP Course::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Course的用法示例。


在下文中一共展示了Course::getName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Course

 function test_update()
 {
     $name = "Western Civ";
     $number = "HST 101";
     $test_course = new Course($name, $number);
     $test_course->save();
     $new_name = "Eastern Meds";
     $test_course->update($new_name);
     $this->assertEquals("Eastern Meds", $test_course->getName());
 }
开发者ID:austinblanchard,项目名称:university_registrar_switch,代码行数:10,代码来源:CourseTest.php

示例2: testUpdate

 function testUpdate()
 {
     $name = "History";
     $course_number = "HIST100";
     $test_course = new Course($name, $course_number);
     $test_course->save();
     $new_name = "Home Economics";
     $test_course->update($new_name, $course_number);
     $this->assertEquals($new_name, $test_course->getName());
 }
开发者ID:julianstewart,项目名称:university_registrar2,代码行数:10,代码来源:CourseTest.php

示例3: Course

 function test_getName()
 {
     //Arrange
     $name = "History";
     $course_number = "HIST101";
     $test_course = new Course($name, $course_number);
     //Act
     $result = $test_course->getName();
     //Assert
     $this->assertEquals($name, $result);
 }
开发者ID:austinblanchard,项目名称:university_registrar,代码行数:11,代码来源:CourseTest.php

示例4: Course

 function test_getName()
 {
     //Arrange
     $name = "High Times";
     $code = "CHEM420";
     $test_course = new Course($name, $code);
     //Act
     $result = $test_course->getName();
     //Assert
     $this->assertEquals($name, $result);
 }
开发者ID:umamiMike,项目名称:registar_epic,代码行数:11,代码来源:CourseTest.php

示例5: testUpdate

 function testUpdate()
 {
     //Arrange
     $id = 1;
     $name = "History";
     $number = 101;
     $test_course = new Course($name, $number, $id);
     $test_course->save();
     //Act
     $new_name = "Auto";
     $test_course->update($new_name);
     //Assert
     $this->assertEquals("Auto", $test_course->getName());
 }
开发者ID:jtorrespdx,项目名称:univ2,代码行数:14,代码来源:CourseTest.php

示例6: testUpdateName

 function testUpdateName()
 {
     //Arrange
     $name = "Psychology 101";
     $course_number = "PSY101";
     $test_course = new Course($name, $course_number);
     $test_course->save();
     $new_name = "Psychology 101A";
     //Act
     $test_course->updateName($new_name);
     //Assert
     $this->assertEquals("Psychology 101A", $test_course->getName());
 }
开发者ID:jeffaustin81,项目名称:University_Registrar_Continued,代码行数:13,代码来源:CourseTest.php

示例7: testUpdate

 function testUpdate()
 {
     //Arrange
     $name = "Math";
     $id = 1;
     $test_course = new Course($name, $id);
     $test_course->save();
     $new_name = "Science";
     //Act
     $test_course->update($new_name);
     //Assert
     $this->assertEquals("Science", $test_course->getName());
 }
开发者ID:JordanNavratil,项目名称:University_Registrar2,代码行数:13,代码来源:CourseTest.php

示例8: updatePost

 public function updatePost(Course $course)
 {
     $post = array('ID' => $course->getPostId(), 'post_content' => "[studypress_child id=" . $course->getId() . "]", 'post_name' => $course->getName(), 'post_title' => $course->getName(), 'post_status' => 'publish', 'post_type' => 'course', 'post_category' => $course->getCategories(), 'post_excerpt' => $course->getDescription() ? $course->getDescription() : $course->getName());
     PostWP::updatePost($post);
 }
开发者ID:Cossumo,项目名称:studypress,代码行数:5,代码来源:CourseManager.class.php

示例9: testUpdate

 function testUpdate()
 {
     //Arrange
     $name = "Math";
     $course_num = "101";
     $id = 1;
     $test_course = new Course($name, $course_num, $id);
     $test_course->save();
     $new_name = "English";
     $new_course_num = "200";
     //Act
     $test_course->update($new_name, $new_course_num);
     //Assert
     $this->assertEquals("English", $test_course->getName());
     $this->assertEquals("200", $test_course->getCourseNum());
 }
开发者ID:jlbethel,项目名称:Registrar-switch,代码行数:16,代码来源:CourseTest.php

示例10: testUpdateCourse

 function testUpdateCourse()
 {
     //Arrange
     $id = null;
     $name = "Intro to Math";
     $number = "MATH100";
     $test_course = new Course($id, $name, $number);
     $test_course->save();
     $name2 = "Math for Dummies";
     $number2 = "MATH000";
     //Act
     $test_course->update($name2, $number2);
     //Assert
     $this->assertEquals($name2, $test_course->getName());
     $this->assertEquals($number2, $test_course->getNumber());
 }
开发者ID:kellimargaret,项目名称:University_Registrar_Part2,代码行数:16,代码来源:CourseTest.php

示例11: Department

 function test_updateName()
 {
     //Arrange
     $test_department = new Department("Biology", "346 Stupid Avenue");
     $test_department->save();
     $name = "History 0001";
     $code = "HS0001";
     $test_course = new Course($name, $code, $test_department->getId());
     //Act
     $new_name = "Da Constitutia";
     $test_course->updateName($new_name);
     //Assert
     $this->assertEquals($new_name, $test_course->getName());
 }
开发者ID:ashlinaronin,项目名称:back2school_fam,代码行数:14,代码来源:CourseTest.php


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