X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTestTrait.php;h=d8a5c165a4f99f09042d4186180d7f5f9a3c3dc6;hb=cc5e5be931bc21e44d0cb26778e8cc15be924e41;hp=36636feabd57701d626d392a75d051733521a786;hpb=8868b7f8d938463169e6bdf98cf7d60f38805b79;p=friendica.git diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index 36636feabd..d8a5c165a4 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -61,13 +61,17 @@ trait DatabaseTestTrait $data = include $fixture; foreach ($data as $tableName => $rows) { - if (!is_array($rows) && !is_numeric($tableName)) { + if (is_numeric($tableName)) { + continue; + } + + if (!is_array($rows)) { $dba->p('TRUNCATE TABLE `' . $tableName . '``'); continue; } foreach ($rows as $row) { - $dba->insert($tableName, $row); + $dba->insert($tableName, $row, true); } } }