Cleanup after unit tests

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-27 22:58:58 +00:00
committed by WineHQ
parent 57c4b64986
commit 1aef926d97
3 changed files with 6 additions and 2 deletions

View File

@@ -197,6 +197,8 @@ function test_application_getWithRating()
return false; return false;
} }
delete_app_and_user($oApp, $oUser);
return true; return true;
} }

View File

@@ -302,6 +302,8 @@ function test_superMaintainerOnAppSubmit()
Maintainer::deleteMaintainer($oUser, $iAppId); Maintainer::deleteMaintainer($oUser, $iAppId);
$oApp->delete();
return true; return true;
} }

View File

@@ -14,8 +14,7 @@ function test_url_update()
$bSuccess = true; // default to success until we detect failure $bSuccess = true; // default to success until we detect failure
/* Log in */ /* Log in */
$oUser = new User(); if(!$oUser = create_and_login_user())
if($retval = $oUser->login($test_email, $test_password) != SUCCESS)
{ {
echo "Received '$retval' instead of SUCCESS('".SUCCESS."')."; echo "Received '$retval' instead of SUCCESS('".SUCCESS."').";
return FALSE; return FALSE;
@@ -61,6 +60,7 @@ function test_url_update()
} }
$oUrl->delete(TRUE); $oUrl->delete(TRUE);
$oUser->delete();
return $bSuccess; return $bSuccess;
} }