當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。