move unittest config deletion to setup since that makes it easier to debug, and does not break config when the test fatal errored

This commit is contained in:
Christian Weiske 2011-04-06 09:50:42 +02:00
parent cba0776325
commit 366987a97d

View file

@ -47,6 +47,11 @@ class TestBaseApi extends TestBase
}
$this->url = $GLOBALS['unittestUrl'] . $this->urlPart;
//clean up before test
if (file_exists($GLOBALS['datadir'] . '/config.unittest.php')) {
unlink($GLOBALS['datadir'] . '/config.unittest.php');
}
$this->us = SemanticScuttle_Service_Factory::get('User');
$this->us->deleteAll();
$this->bs = SemanticScuttle_Service_Factory::get('Bookmark');
@ -57,18 +62,6 @@ class TestBaseApi extends TestBase
/**
* Clean up after test
*/
public function tearDown()
{
if (file_exists($GLOBALS['datadir'] . '/config.unittest.php')) {
unlink($GLOBALS['datadir'] . '/config.unittest.php');
}
}
/**
* Gets a HTTP request object.
* Uses $this->url plus $urlSuffix as request URL.