當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserModel::deleteAll方法代碼示例

本文整理匯總了PHP中UserModel::deleteAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserModel::deleteAll方法的具體用法?PHP UserModel::deleteAll怎麽用?PHP UserModel::deleteAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserModel的用法示例。


在下文中一共展示了UserModel::deleteAll方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setupBeforeClass

 public static function setupBeforeClass()
 {
     // 下麵四行代碼模擬出一個應用實例, 每一行都很關鍵, 需正確設置參數
     $app = new \Think\PhpunitHelper();
     $app->setMVC('domain.com', 'Home', 'Index');
     $app->setTestConfig(['DB_NAME' => 'mydb_test', 'DB_HOST' => 'localhost']);
     // 一定要設置一個測試用的數據庫,避免測試過程破壞生產數據
     $app->start();
     error_reporting(E_ERROR);
     $userTable = new UserModel();
     $userTable->deleteAll();
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:12,代碼來源:MoodListViewModelTest.php

示例2: testDeleteAll

 public function testDeleteAll()
 {
     $table = new UserModel();
     $table->deleteAll();
     $this->assertCount(0, $table->select());
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:6,代碼來源:UserModelTest.php

示例3: testDeleteAll

 public function testDeleteAll()
 {
     $userTable = new UserModel();
     $letterTable = new LetterListModel();
     $userTable->deleteAll();
     $letter = $letterTable->find();
     $user = $userTable->find();
     $this->assertTrue($letter == null && $user == null);
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:9,代碼來源:LetterListModelTest.php

示例4: testDeleteAll

 public function testDeleteAll()
 {
     $userTable = new UserModel();
     $commentTable = new CommentModel();
     $moodTable = new MoodListModel();
     $userTable->deleteAll();
     $comment = $commentTable->find();
     $mood = $moodTable->find();
     $user = $userTable->find();
     $this->assertTrue($comment == null && $user == null && $mood == null);
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:11,代碼來源:CommentModelTest.php

示例5: testDeleteAllUser

 public function testDeleteAllUser()
 {
     $userTable = new UserModel();
     $moodTable = new MoodListModel();
     $userTable->deleteAll();
     $this->assertTrue($moodTable->find() == NULL && $userTable->find() == NULL);
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:7,代碼來源:MoodListModelTest.php

示例6: testDeleteAllUser

 public function testDeleteAllUser()
 {
     $userTable = new UserModel();
     $moodTable = new MoodListModel();
     $praiseTable = new PraiseMoodModel();
     $userTable->deleteAll();
     $user = $userTable->find();
     $mood = $moodTable->find();
     $praise = $praiseTable->find();
     $this->assertTrue($user === null && $mood === null && $praise === null);
 }
開發者ID:chen8840,項目名稱:LMJ-s-project,代碼行數:11,代碼來源:PraiseMoodModelTest.php


注:本文中的UserModel::deleteAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。