本文整理汇总了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());
}
示例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());
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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());
}
示例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);
}
示例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());
}
示例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());
}
示例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());
}