本文整理匯總了PHP中Stat::deleteAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Stat::deleteAll方法的具體用法?PHP Stat::deleteAll怎麽用?PHP Stat::deleteAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Stat
的用法示例。
在下文中一共展示了Stat::deleteAll方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: tearDown
protected function tearDown()
{
CharClass::deleteAll();
Character::deleteAll();
Race::deleteAll();
Skill::deleteAll();
Stat::deleteAll();
Description::deleteAll();
Background::deleteAll();
}
示例2: testDeleteAll
function testDeleteAll()
{
//Arrange
$str = 2;
$dex = 2;
$con = 2;
$intel = 2;
$wis = 2;
$cha = 2;
$init = 2;
$max_hp = 2;
$speed = 2;
$ac = 2;
$acrobatics = 2;
$arcana = 2;
$animal_handling = 2;
$athletics = 2;
$deception = 2;
$history = 2;
$insight = 2;
$intimidation = 2;
$investigation = 2;
$medicine = 2;
$nature = 2;
$perception = 2;
$performance = 2;
$persuasion = 2;
$proficiency = 2;
$religion = 2;
$sleight_of_hand = 2;
$stealth = 2;
$survival = 2;
$test_stat = new Stat($ac, $acrobatics, $animal_handling, $arcana, $athletics, $cha, $con, $deception, $dex, $history, $init, $insight, $intel, $intimidation, $investigation, $max_hp, $medicine, $nature, $perception, $performance, $persuasion, $proficiency, $religion, $speed, $sleight_of_hand, $stealth, $str, $survival, $wis);
$test_stat->save();
$str2 = 2;
$dex2 = 2;
$con2 = 2;
$int2 = 2;
$wis2 = 2;
$cha2 = 2;
$init2 = 2;
$max_hp2 = 2;
$speed2 = 2;
$ac2 = 2;
$acrobatics2 = 2;
$arcana2 = 2;
$animal_handling2 = 2;
$athletics2 = 2;
$deception2 = 2;
$history2 = 2;
$insight2 = 2;
$intimidation2 = 2;
$investigation2 = 2;
$medicine2 = 2;
$nature2 = 2;
$perception2 = 2;
$performance2 = 2;
$persuasion2 = 2;
$proficiency2 = 2;
$religion2 = 2;
$sleight_of_hand2 = 2;
$stealth2 = 2;
$survival2 = 2;
$test_stat2 = new Stat($ac2, $acrobatics2, $animal_handling2, $arcana2, $athletics2, $cha2, $con2, $deception2, $dex2, $history2, $init2, $insight2, $int2, $intimidation2, $investigation2, $max_hp2, $medicine2, $nature2, $perception2, $performance2, $persuasion2, $proficiency2, $religion2, $speed2, $sleight_of_hand2, $stealth2, $str2, $survival2, $wis2);
$test_stat2->save();
//Act
Stat::deleteAll();
//Assert
$result = Stat::getAll();
$this->assertEquals([], $result);
}