summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test/controllers/gallery_unit_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery_unit_test/controllers/gallery_unit_test.php')
-rw-r--r--modules/gallery_unit_test/controllers/gallery_unit_test.php12
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";