From f93aa6c7aceeb7ed9ea899cfe232b3bd097b2422 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:26:30 +0200 Subject: make files use pear directories --- tests/prepare.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') 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'; -- cgit v1.2.3-54-g00ecf From b243ecd53f82b3559980ce31d84a59554eb5b8f5 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:33:58 +0200 Subject: remove unneeded code --- tests/TagsCacheTest.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests') 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(); -- cgit v1.2.3-54-g00ecf