diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 09:50:42 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 09:50:42 +0200 |
commit | 366987a97d41f1a276dfd43921a2fcf1f6e70f00 (patch) | |
tree | 1035396f03089f9228e9d04de217e7fa0dbb23e4 /tests/TestBaseApi.php | |
parent | cba0776325ac82bc255feb9a44b3bf312b02f6dc (diff) | |
download | semanticscuttle-366987a97d41f1a276dfd43921a2fcf1f6e70f00.tar.gz semanticscuttle-366987a97d41f1a276dfd43921a2fcf1f6e70f00.tar.bz2 |
move unittest config deletion to setup since that makes it easier to debug, and does not break config when the test fatal errored
Diffstat (limited to 'tests/TestBaseApi.php')
-rw-r--r-- | tests/TestBaseApi.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/TestBaseApi.php b/tests/TestBaseApi.php index 73135fb..9081a4a 100644 --- a/tests/TestBaseApi.php +++ b/tests/TestBaseApi.php @@ -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'); @@ -58,18 +63,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. * |