[TASK] Improve error reporting on fixture loading 45/36045/2
authorChristian Weiske <christian.weiske@netresearch.de>
Fri, 16 Jan 2015 14:53:47 +0000 (15:53 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 18 Jan 2015 10:36:58 +0000 (11:36 +0100)
Show the actual SQL error that happened when loading a fixture
file in the functional tests fails.

Change-Id: I1a7620a3fe1c37ed017f37b16a516b969319353e
Resolves: #64313
Releases: master
Reviewed-on: http://review.typo3.org/36045
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Frederic Gaus <gaus@flagbit.de>
Tested-by: Frederic Gaus <gaus@flagbit.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Tests/FunctionalTestCase.php

index 3f7d85d..bec4953 100644 (file)
@@ -279,7 +279,7 @@ abstract class FunctionalTestCase extends BaseTestCase {
                        $result = $database->exec_INSERTquery($tableName, $insertArray);
                        if ($result === FALSE) {
                                throw new Exception(
-                                       'Error when processing fixture file: ' . $path . ' Can not insert data to table ' . $tableName,
+                                       'Error when processing fixture file: ' . $path . ' Can not insert data to table ' . $tableName . ': ' . $database->sql_error(),
                                        1376746262
                                );
                        }