diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-02 02:59:20 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-02 02:59:20 +0000 |
| commit | 9d0927dda936756f1f5003813f437d714fe481f8 (patch) | |
| tree | fe1b887345b37387ab0ddcfd78bf344f6150b6cc /modules/gallery_unit_test/controllers | |
| parent | a6f794c20dc3592bcaef17c622413c1b670a20d8 (diff) | |
| parent | 43985ea2fb137aa7d532617271e37d7c20def3c5 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery_unit_test/controllers')
| -rw-r--r-- | modules/gallery_unit_test/controllers/gallery_unit_test.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php index 498dd756..2690ad24 100644 --- a/modules/gallery_unit_test/controllers/gallery_unit_test.php +++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php @@ -18,11 +18,15 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Gallery_Unit_Test_Controller extends Controller { - function Index() { + function index() { if (!TEST_MODE) { throw new Kohana_404_Exception(); } + // Force strict behavior to flush out bugs early + ini_set("display_errors", true); + error_reporting(-1); + // Jump through some hoops to satisfy the way that we check for the site_domain in // config.php. We structure this such that the code in config will leave us with a // site_domain of "." (for historical reasons) @@ -127,6 +131,12 @@ class Gallery_Unit_Test_Controller extends Controller { $filter = count($_SERVER["argv"]) > 2 ? $_SERVER["argv"][2] : null; print new Unit_Test($modules, $filter); + } catch (ORM_Validation_Exception $e) { + print "Validation Exception: {$e->getMessage()}\n"; + print $e->getTraceAsString() . "\n"; + foreach ($e->validation->errors() as $field => $msg) { + print "$field: $msg\n"; + } } catch (Exception $e) { print "Exception: {$e->getMessage()}\n"; print $e->getTraceAsString() . "\n"; |
