本文整理汇总了PHP中Student::deleteAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::deleteAll方法的具体用法?PHP Student::deleteAll怎么用?PHP Student::deleteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Student
的用法示例。
在下文中一共展示了Student::deleteAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_deleteAll
function test_deleteAll()
{
$name = "Chris";
$date = "1111-11-11";
$test_student = new Student($name, $date);
$test_student->save();
$name2 = "Dillon";
$test_student2 = new Student($name2, $date);
$test_student2->save();
Student::deleteAll();
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例2: test_deleteAll
function test_deleteAll()
{
$student_name = "Abe Lincoln";
$enroll_date = "06-15-2015";
$test_student = new Student($student_name, $enroll_date);
$test_student->save();
$student_name2 = "George Washington";
$enroll_date2 = "05-30-2015";
$test_student2 = new Student($student_name2, $enroll_date2);
$test_student2->save();
Student::deleteAll();
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例3: test_DeleteAll
function test_DeleteAll()
{
//Arrange
$name = "Mike";
$enrollment_date = "2015-12-12";
$test_student = new Student($name, $enrollment_date);
$test_student->save();
$name2 = "The Same Exact Name";
$enrollment_date2 = "2015-12-12";
$test_student2 = new Student($name2, $enrollment_date2);
$test_student2->save();
Student::deleteAll();
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例4: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Shmuel Irving-Jones";
$enroll_date = "2015-08-25";
$test_student = new Student($name, $enroll_date);
$test_student->save();
$name2 = "Billy Bartle-Barnaby";
$enroll_date2 = "2015-07-09";
$test_student2 = new Student($name2, $enroll_date2);
$test_student2->save();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例5: testDeleteAll
function testDeleteAll()
{
//arrange
$student_id = 1;
$student_name = "History";
$student_number = "101";
$test_student = new Student($student_name, $student_number, $student_id);
$test_student->save();
$student_id2 = 2;
$student_name2 = "Math";
$student_number2 = "25";
$test_student2 = new Student($student_name2, $student_number2, $student_id2);
$test_student2->save();
//act
Student::deleteAll();
//assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例6: testDeleteAll
function testDeleteAll()
{
//Arrange
$id = null;
$name = "Micah";
$enrollment_date = "2015-08-28";
$test_student = new Student($id, $name, $enrollment_date);
$test_student->save();
$name2 = "Phil";
$enrollment_date2 = "2015-04-01";
$test_student2 = new Student($id, $name2, $enrollment_date2);
$test_student2->save();
//Act
Student::deleteAll();
$result = Student::getAll();
//Assert
$this->assertEquals([], $result);
}
示例7: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Sandra Maley";
$enrollment_date = "2016-04-29";
$name2 = "Margaret Sinclair";
$enrollment_date2 = "2017-11-30";
$test_student = new Student($name, $enrollment_date);
$test_student->save();
$test_student2 = new Student($name2, $enrollment_date2);
$test_student2->save();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例8: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Elliot Michaels";
$date = "2015-08-03";
$id = 1;
$test_student = new Student($name, $date, $id);
$test_student->save();
$name2 = "Drake Michaels";
$date2 = "2011-02-02";
$id2 = 2;
$test_student2 = new Student($name2, $date2, $id2);
$test_student2->save();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例9: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Bob";
$date_of_enrollment = "2015-08-15";
$test_student = new Student($name, $date_of_enrollment);
$test_student->save();
$name2 = "Jackie";
$date_of_enrollment2 = "2015-09-16";
$test_student2 = new Student($name2, $date_of_enrollment2);
$test_student2->save();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例10: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Steve Beekman";
$date = "2015-08-23";
$test_student = new Student($name, $date);
$test_student->save();
$name2 = "Fred Flintstone";
$date2 = "0001-01-01";
$test_student2 = new Student($name2, $date2);
$test_student2->save();
//Act
Student::deleteAll();
$result = Student::getAll();
//Assert
$this->assertEquals([], $result);
}
示例11: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Math";
$date = '0000-00-00';
$id = null;
$test_course = new Course($name, $id);
$test_course->save();
$student_name = "Student1";
$id = 1;
$course_id = $test_course->getId();
$student_name2 = "Student2";
$id2 = 2;
$course_id2 = $test_course->getId();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}
示例12: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Rick";
$date = "2015-08-15";
$id = 1;
$test_student = new Student($name, $date, $id);
$test_student->save();
$name2 = "Obama";
$date2 = "2015-10-10";
$id2 = 2;
$test_student2 = new Student($name, $date, $id);
$test_student2->save();
//Act
Student::deleteAll();
$result = Student::getAll();
//Assert
$this->assertEquals([], $result);
}
示例13: test_deleteAll
function test_deleteAll()
{
//Arrange
$student_name = "Bob";
$enroll_date = "2012-10-20";
$id = null;
$test_student = new Student($student_name, $enroll_date, $id);
$test_student->save();
$student_name2 = "Sue";
$enroll_date2 = "2013-09-09";
$test_student2 = new Student($student_name2, $enroll_date2, $id);
$test_student2->save();
//Act
Student::deleteAll();
$result = Student::getAll();
//Assert
$this->assertEquals([], $result);
}
示例14: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Bob";
$enrollment_date = "2015-06-06";
$id = 1;
$test_student = new Student($name, $enrollment_date, $id);
$test_student->save();
$name2 = "John";
$enrollment_date2 = "2015-06-06";
$id2 = 1;
$test_student2 = new Student($name2, $enrollment_date2, $id2);
$test_student2->save();
//Act
Student::deleteAll();
$result = Student::getAll();
//Assert
$this->assertEquals([], $result);
}
示例15: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "Student1";
$id = 1;
$test_student = new Student($name, $id);
$test_student->save();
$name2 = "Student2";
$id2 = 2;
$test_student2 = new Student($name, $id);
$test_student2->save();
//Act
Student::deleteAll();
//Assert
$result = Student::getAll();
$this->assertEquals([], $result);
}