Happy New Year!
[platal.git] / include / test.inc.php
index a5a4fd7..c29f152 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__) . '/platal.inc.php';
-require_once 'PHPUnit/Framework.php';
+$testinclude = dirname(__FILE__) . '/../../include/test.inc.php';
+if (file_exists($testinclude)) {
+    require_once $testinclude;
+} else {
+    require_once dirname(__FILE__) . '/platal.inc.php';
+    require_once 'PHPUnit/Framework.php';
 
-function __autoload($class)
-{
-    pl_autoload($class);
-}
-
-abstract class PlTestCase extends PHPUnit_Framework_TestCase
-{
+    function __autoload($class)
+    {
+        pl_autoload($class);
+    }
 }
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: