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


PHP Activity::deleteAll方法代码示例

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


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

示例1: tearDown

 protected function tearDown()
 {
     Business::deleteAll();
     //  Category::deleteAll();
     //  User::deleteAll();
     Activity::deleteAll();
 }
开发者ID:jtorrespdx,项目名称:walk_ins_welcome,代码行数:7,代码来源:BusinessTest.php

示例2: testDeleteAll

 function testDeleteAll()
 {
     //Arrange
     $activity_name = "Activity One";
     $activity_date = '2016-01-01';
     $activity_location = "Location";
     $activity_description = "Description of Activity One";
     $activity_price = "Price of Activity One";
     $activity_quantity = 10;
     $business_id = 11;
     $activity_category_id = 12;
     $id = 1;
     $test_activity = new Activity($activity_name, $activity_date, $activity_location, $activity_description, $activity_price, $activity_quantity, $business_id, $activity_category_id, $id = null);
     $test_activity->save();
     $activity_name2 = "Activity Two";
     $activity_date2 = '2016-02-02';
     $activity_location2 = "Location Two";
     $activity_description2 = "Description of Activity Two";
     $activity_price2 = "Price of Activity Two";
     $activity_quantity2 = 20;
     $business_id2 = 21;
     $activity_category_id2 = 22;
     $id2 = 2;
     $test_activity2 = new Activity($activity_name, $activity_date, $activity_location, $activity_description, $activity_price, $activity_quantity, $business_id, $activity_category_id, $id = null);
     $test_activity2->save();
     //Act
     Activity::deleteAll();
     $result = Activity::getAll();
     //Assert
     $this->assertEquals([], $result);
 }
开发者ID:jtorrespdx,项目名称:walk_ins_welcome,代码行数:31,代码来源:ActivityTest.php

示例3: tearDown

 protected function tearDown()
 {
     User::deleteAll();
     Activity::deleteAll();
 }
开发者ID:jtorrespdx,项目名称:walk_ins_welcome,代码行数:5,代码来源:UserTest.php


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