}
/**
+ * Performs custom preparations on the process isolation template.
+ *
+ * @param Text_Template $template
+ * @since Method available since Release 3.4.0
+ */
+ protected function prepareTemplate(Text_Template $template)
+ {
+ // needed to get bootstrap file included in separate process again
+ $template->setVar(array(
+ 'globals' => sprintf("\$GLOBALS['__PHPUNIT_BOOTSTRAP'] = '%s/bootstrap.php';", __DIR__)
+ ));
+ }
+
+ /**
* fetch test user credentials
*
* @return array
+++ /dev/null
-<?php
-/**
- * Tine 2.0
- *
- * @package 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 Matthias Greiling <m.greiling@metaways.de>
- */
-
-/*
- * Set error reporting
- *
- * @todo put that in config.inc as well?
- */
-error_reporting( E_ALL | E_STRICT );
-
-/*
- * Set include path
- */
-define('PATH_TO_REAL_DIR', dirname(__FILE__). '/../../tine20');
-define('PATH_TO_TINE_LIBRARY', dirname(__FILE__). '/../../tine20/library');
-define('PATH_TO_TEST_DIR', dirname(__FILE__));
-
-$path = array(
- PATH_TO_REAL_DIR,
- PATH_TO_TEST_DIR,
- PATH_TO_TEST_DIR . PATH_SEPARATOR . 'library',
- PATH_TO_TINE_LIBRARY,
- get_include_path(),
-);
-
-set_include_path(implode(PATH_SEPARATOR, $path));
-
-require_once 'bootstrap.php';
-
-// phpunit wants to handle the errors / report all errors + restore the default error handler
-error_reporting(E_ALL | E_STRICT);
-restore_error_handler();
-
-// disable sending cookies
-Zend_Session::setOptions(array(
- 'use_cookies' => 0,
- 'use_only_cookies' => 0
-));
/**
* Test helper
*/
-require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'TestHelper.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestHelper.php';
/**
* Test class for Calendar_Backend_Sql
* @author Matthias Greiling <m.greiling@metaways.de>
*/
-/*
- * Set include path
- */
-
-define('PATH_TO_REAL_DIR', dirname(__FILE__). '/../../tine20');
-define('PATH_TO_TINE_LIBRARY', dirname(__FILE__). '/../../tine20/library');
-define('PATH_TO_TEST_DIR', dirname(__FILE__));
-
-$path = array(
- PATH_TO_REAL_DIR,
- PATH_TO_TEST_DIR,
- PATH_TO_TEST_DIR . PATH_SEPARATOR . 'library',
- PATH_TO_TINE_LIBRARY,
- get_include_path(),
-);
-
-set_include_path(implode(PATH_SEPARATOR, $path));
-
-require_once 'bootstrap.php';
-
-// add test paths to autoloader
-$autoloader = require 'vendor/autoload.php';
-$autoloader->set('', $path);
-
-// phpunit wants to handle the errors / report all errors + restore the default error handler
-error_reporting(E_ALL | E_STRICT);
-restore_error_handler();
-
-// disable sending cookies
-Zend_Session::setOptions(array(
- 'use_cookies' => 0,
- 'use_only_cookies' => 0
-));
-
Tinebase_Session_Abstract::setSessionEnabled('TINE20SESSID');
TestServer::getInstance()->initFramework();
--- /dev/null
+<?php
+require_once '../../tine20/bootstrap.php';
+
+// add path the local directory
+$autoloader->add('', array(__DIR__));
+
+define('PATH_TO_REAL_DIR', dirname(__FILE__). '/../../tine20');
+define('PATH_TO_TINE_LIBRARY', dirname(__FILE__). '/../../tine20/library');
+define('PATH_TO_TEST_DIR', dirname(__FILE__));
+
+// phpunit wants to handle the errors / report all errors + restore the default error handler
+error_reporting(E_ALL | E_STRICT);
+restore_error_handler();
+
+// disable sending cookies
+Zend_Session::setOptions(array(
+ 'use_cookies' => 0,
+ 'use_only_cookies' => 0
+));
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false">
+ syntaxCheck="false"
+ bootstrap="bootstrap.php">
<listeners>
<listener class="LogListener" file="LogListener.php" />
</listeners>
}
// intialize composers autoloader
-require 'vendor/autoload.php';
+$autoloader = require __DIR__ . '/vendor/autoload.php';
// initialize plugins
require 'init_plugins.php';
<!-- ============================================ -->
<target name="phpunit-exec" depends="clean, phpunit-prepare">
<property name="testinclude" value="AllTests.php" override="true" />
- <property name="includepath" value=".:/usr/share/php/:${configdir}:${project.basedir}" override="true" />
+ <property name="includepath" value=".:/usr/share/php/:${configdir}:${project.basedir}:${project.basedir}/library:${project.basedir}/library/zf1ext" override="true" />
<property name="testadditionalparams" value="" override="true" />
<echo msg="Starting Tests..." />
-d include_path=${includepath}
--configuration ${testconfigdir}/phpunit.xml
--log-junit ${builddir}/reports/junit.xml
- --bootstrap ServerTestHelper.php
${testadditionalparams}
${testinclude} " />
</exec>
"psr-0": {
"": ["", "library"],
"TimeZoneConvert": "library/TimeZoneConvert/lib/",
- "Zend": ["", "library"],
+ "Zend": ["", "library", "library/zf1ext"],
"qCal": "library/qCal/lib"
},
"classmap": [
]
},
"include-path-desc": "ZF1 still needs include path as it does not consequently use autoloading internally",
- "include-path": ["", "library"]
+ "include-path": ["", "library", "library/zf1ext"]
}