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


PHP Course::deleteAll方法代码示例

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


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

示例1: tearDown

 protected function tearDown()
 {
     Lesson::deleteAll();
     Unit::deleteAll();
     Course::deleteAll();
     User::deleteAll();
 }
开发者ID:kylepratuch,项目名称:EdBuilder,代码行数:7,代码来源:LessonTest.php

示例2: testDeleteAll

 function testDeleteAll()
 {
     $name = "Math";
     $id = 1;
     $test_course = new Course($name);
     $test_course->save();
     $name2 = "Science";
     $id2 = 2;
     $test_course2 = new Course($name2);
     $test_course2->save();
     Course::deleteAll();
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:JordanNavratil,项目名称:University_Registrar2,代码行数:14,代码来源:CourseTest.php

示例3: test_deleteAll

 function test_deleteAll()
 {
     $course_name = "History";
     $course_number = "HIST 101";
     $test_course = new Course($course_name, $course_number);
     $test_course->save();
     $course_name2 = "Biology";
     $course_number2 = "BIO 101";
     $test_course2 = new Course($course_name2, $course_number2);
     $test_course2->save();
     Course::deleteAll();
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:CharlesAMoss,项目名称:epic_Registrar_part2,代码行数:14,代码来源:CourseTest.php

示例4: test_deleteAll

 function test_deleteAll()
 {
     $name = "Western Civ";
     $number = "HST 101";
     $test_course = new Course($name, $number);
     $test_course->save();
     $name2 = "Remedial Math";
     $number2 = "MTH 64";
     $test_course2 = new Course($name2, $number2);
     $test_course2->save();
     Course::deleteAll();
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:austinblanchard,项目名称:university_registrar_switch,代码行数:14,代码来源:CourseTest.php

示例5: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $name = "High Times";
     $code = "CHEM420";
     $test_course = new Course($name, $code);
     $test_course->save();
     $name2 = "Gavanese Jamelan";
     $code2 = "MUSC69";
     $test_course2 = new Course($name2, $code2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:umamiMike,项目名称:registar_epic,代码行数:17,代码来源:CourseTest.php

示例6: testDeleteAll

 function testDeleteAll()
 {
     //arrange
     $course_id = 1;
     $course_name = "History";
     $course_number = "101";
     $test_course = new Course($course_name, $course_number, $course_id);
     $test_course->save();
     $course_id2 = 2;
     $course_name2 = "Math";
     $course_number2 = "25";
     $test_course2 = new Course($course_name2, $course_number2, $course_id2);
     $test_course2->save();
     //act
     Course::deleteAll();
     //assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:nathanhwyoung,项目名称:registrar,代码行数:19,代码来源:CourseTest.php

示例7: tearDown

 protected function tearDown()
 {
     Course::deleteAll();
 }
开发者ID:julianstewart,项目名称:university_registrar2,代码行数:4,代码来源:CourseTest.php

示例8: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $title = "Intro to Typing: COM-91";
     $teacher = "Ancient Raven";
     $time = "TH 9PM-11PM";
     $semester = "Fall";
     $test_course = new Course($title, $teacher, $time, $semester);
     $test_course->save();
     $title2 = "Intro to Ladders: SHOP-10";
     $teacher2 = "Jeff Winger";
     $time2 = "MWF 11AM-12PM";
     $semester2 = "Spring";
     $test_course2 = new Course($title2, $teacher2, $time2, $semester2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     $result = Course::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
开发者ID:jlbethel,项目名称:Registrar_test,代码行数:21,代码来源:CourseTest.php

示例9: tearDown

 protected function tearDown()
 {
     Course::deleteAll();
     Student::deleteAll();
     Department::deleteAll();
 }
开发者ID:ashlinaronin,项目名称:back2school_fam,代码行数:6,代码来源:CourseTest.php

示例10: PDO

require_once __DIR__ . "/../src/Course.php";
$app = new Silex\Application();
$app['debug'] = true;
$server = 'mysql:host=localhost;dbname=university';
$username = 'root';
$password = 'root';
$DB = new PDO($server, $username, $password);
$app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views'));
use Symfony\Component\HttpFoundation\Request;
Request::enableHttpMethodParameterOverride();
//Home
$app->get("/", function () use($app) {
    return $app['twig']->render('index.html.twig');
});
$app->post("/delete_courses", function () use($app) {
    Course::deleteAll();
    return $app['twig']->render('index.html.twig');
});
//Courses
$app->get("/courses", function () use($app) {
    return $app['twig']->render('courses.html.twig', array('courses' => Course::getAll()));
});
$app->post("/courses", function () use($app) {
    $course = new Course($_POST['name'], $_POST['number']);
    $course->save();
    return $app['twig']->render('courses.html.twig', array('courses' => Course::getAll()));
});
$app->get("/courses/{id}", function ($id) use($app) {
    $course = Course::find($id);
    return $app['twig']->render('course.html.twig', array('course' => $course, 'students' => $course->getStudents(), 'all_students' => Student::getAll()));
});
开发者ID:jtorrespdx,项目名称:univ2,代码行数:31,代码来源:app.php

示例11: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $name = "History";
     $course_number = "HIST101";
     $name2 = "English";
     $course_number2 = "ENG500";
     $test_course = new Course($name, $course_number);
     $test_course->save();
     $test_course2 = new Course($name2, $course_number2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:austinblanchard,项目名称:university_registrar,代码行数:17,代码来源:CourseTest.php

示例12: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $id = null;
     $name = "Intro to Math";
     $number = "MATH100";
     $test_course = new Course($id, $name, $number);
     $test_course->save();
     $name2 = "Intro to History";
     $number2 = "HIST101";
     $test_course2 = new Course($id, $name2, $number2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:kellimargaret,项目名称:University_Registrar_Part2,代码行数:18,代码来源:CourseTest.php

示例13: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $name = "Biology";
     $number = 101;
     $id = 1;
     $name2 = "Auto";
     $number2 = 101;
     $id2 = 2;
     $test_course = new Course($name, $number, $id);
     $test_course->save();
     $test_course2 = new Course($name2, $number2, $id2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:Camolot,项目名称:student,代码行数:19,代码来源:CourseTest.php

示例14: test_deleteAll

 function test_deleteAll()
 {
     //Arrange
     $course_name = "History 110";
     $id = 1;
     $course_number = "HST110";
     $test_course = new Course($course_name, $id, $course_number);
     $test_course->save();
     $course_name2 = "Math 101";
     $id2 = 2;
     $course_number2 = "MTH101";
     $test_course2 = new Course($course_name2, $id2, $course_number2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:kylepratuch,项目名称:registrar2,代码行数:19,代码来源:CourseTest.php

示例15: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $name = "Psychology 101";
     $course_number = "2015-08-15";
     $test_course = new Course($name, $course_number);
     $test_course->save();
     $name2 = "Psychology 102";
     $course_number2 = "PSY102";
     $test_course2 = new Course($name2, $course_number2);
     $test_course2->save();
     //Act
     Course::deleteAll();
     //Assert
     $result = Course::getAll();
     $this->assertEquals([], $result);
 }
开发者ID:jeffaustin81,项目名称:University_Registrar_Continued,代码行数:17,代码来源:CourseTest.php


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