summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/TagsCacheTest.php3
-rw-r--r--tests/prepare.php8
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/TagsCacheTest.php b/tests/TagsCacheTest.php
index 9097bcb..84f4ec0 100644
--- a/tests/TagsCacheTest.php
+++ b/tests/TagsCacheTest.php
@@ -54,9 +54,6 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
- global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
- require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
-
$this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll();
diff --git a/tests/prepare.php b/tests/prepare.php
index ce9cd1c..6afc284 100644
--- a/tests/prepare.php
+++ b/tests/prepare.php
@@ -19,7 +19,13 @@
$_SERVER['HTTP_HOST'] = 'http://localhost/';
define('UNIT_TEST_MODE', true);
-require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+if ('@data_dir@' == '@' . 'data_dir@') {
+ //non pear-install
+ require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+} else {
+ //pear installation; files are in include path
+ require_once 'SemanticScuttle/header.php';
+}
require_once dirname(__FILE__) . '/TestBase.php';
require_once dirname(__FILE__) . '/TestBaseApi.php';