本文整理汇总了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();
}
示例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);
}
示例3: tearDown
protected function tearDown()
{
User::deleteAll();
Activity::deleteAll();
}