tests/Tests.php
authorAlan Knowles <alan@roojs.com>
Wed, 22 Aug 2012 06:05:31 +0000 (14:05 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 22 Aug 2012 06:05:31 +0000 (14:05 +0800)
tests/Tests.php

index 5a46e81..9598b07 100644 (file)
@@ -2,17 +2,21 @@
 
 // include to make the tests run..
 // this needs fixing - probably needs to point to a test framework..
-$_test_dir  = '/var/www/web.roojsolutions/';
 
-ini_set('include_path', 
-            $_test_dir  . ':' . 
-            $_test_dir  .'/pearfix:' . 
-            $_test_dir  .'/pear:' . 
-            ini_get('include_path'));
-
-define('DB_DATAOBJECT_NO_OVERLOAD', true);
-
-require_once 'HTML/FlexyFramework/Page.php';
-
-require_once 'DB/DataObject.php';
+function init() {
+    global $_test_dir  ;
+    $_test_dir  = '/var/www/web.roojsolutions/';
+    
+    ini_set('include_path', 
+                $_test_dir  . ':' . 
+                $_test_dir  .'/pearfix:' . 
+                $_test_dir  .'/pear:' . 
+                ini_get('include_path'));
+    
+    define('DB_DATAOBJECT_NO_OVERLOAD', true);
+    
+    require_once 'HTML/FlexyFramework/Page.php';
+    
+    require_once 'DB/DataObject.php';
 
+}
\ No newline at end of file