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:
parent
cba0776325
commit
366987a97d
1 changed files with 5 additions and 12 deletions
|
@ -47,6 +47,11 @@ class TestBaseApi extends TestBase
|
||||||
}
|
}
|
||||||
$this->url = $GLOBALS['unittestUrl'] . $this->urlPart;
|
$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 = SemanticScuttle_Service_Factory::get('User');
|
||||||
$this->us->deleteAll();
|
$this->us->deleteAll();
|
||||||
$this->bs = SemanticScuttle_Service_Factory::get('Bookmark');
|
$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.
|
* Gets a HTTP request object.
|
||||||
* Uses $this->url plus $urlSuffix as request URL.
|
* Uses $this->url plus $urlSuffix as request URL.
|
||||||
|
|
Loading…
Reference in a new issue