setup tests: phpunitconfig.inc.php is taken from any include path
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Feb 2015 16:11:28 +0000 (17:11 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 10 Feb 2015 10:17:27 +0000 (11:17 +0100)
Change-Id: I721430ff975e141764eb3596a35c731b76c99e2d
Reviewed-on: http://gerrit.tine20.com/customers/1626
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/setup/TestHelper.php

index 896c46f..637332b 100644 (file)
@@ -5,8 +5,10 @@
  * @package     setup tests
  * @subpackage  test root
  * @license     http://www.gnu.org/licenses/agpl.html AGPL3
- * @copyright   Copyright (c) 2008 Metaways Infosystems GmbH (http://www.metaways.de)
- * @author      Philipp Schuele <p.schuele@metaways.de>
+ * @copyright   Copyright (c) 2008-2015 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @author      Philipp Schüle <p.schuele@metaways.de>
+ * 
+ * @todo        refactor setup tests bootstrap
  */
 
 /*
@@ -51,11 +53,8 @@ if (version_compare($phpUnitVersion[1], "3.6.0") >= 0) {
 }
 
 // get config
-if(file_exists(dirname(__FILE__) . '/phpunitconfig.inc.php')) {
-    $config = new Zend_Config(require dirname(__FILE__) . '/phpunitconfig.inc.php');
-} else {
-    throw new Exception("Couldn't find phpunitconfig.inc.php! \n");
-}
+$configData = include('phpunitconfig.inc.php');
+$config = new Zend_Config($configData);
 
 $_SERVER['DOCUMENT_ROOT'] = $config->docroot;