Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以告诉我如何在我的 PhpUnit 测试中涵盖以下异常情况吗?
$DB->Insert(db query here...); $lastInsertID = $DB->InsertID(); if (!$lastInsertID) { throw new Exception('Unable to insert new record'); }
提前致谢
你可以嘲笑$DB->Insert返回false
$DB->Insert
false