MDL-52799 phpunit: Truncate records for brokedmysql not empty.

This commit is contained in:
Rajesh Taneja
2016-01-18 14:36:29 +08:00
parent 6a01418aa1
commit 31bbc4db30
+6 -1
View File
@@ -638,7 +638,12 @@ abstract class testing_util {
foreach ($data as $table => $records) {
if ($borkedmysql) {
if (empty($records) and isset($empties[$table])) {
if (empty($records)) {
if (isset($empties[$table])) {
// Table was not modified and is empty.
} else {
$DB->delete_records($table, null);
}
continue;
}