ChangeSet ID: 30912 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/01/27 16:58:58
Modified files: unit_test : test_application.php test_maintainer.php test_url.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com Cleanup after unit tests
Patch: http://cvs.winehq.org/patch.py?id=30912
Old revision New revision Changes Path 1.4 1.5 +2 -0 appdb/unit_test/test_application.php 1.5 1.6 +2 -0 appdb/unit_test/test_maintainer.php 1.1 1.2 +2 -2 appdb/unit_test/test_url.php
Index: appdb/unit_test/test_application.php diff -u -p appdb/unit_test/test_application.php:1.4 appdb/unit_test/test_application.php:1.5 --- appdb/unit_test/test_application.php:1.4 27 Jan 2007 22:58:58 -0000 +++ appdb/unit_test/test_application.php 27 Jan 2007 22:58:58 -0000 @@ -197,6 +197,8 @@ function test_application_getWithRating( return false; }
+ delete_app_and_user($oApp, $oUser); + return true; }
Index: appdb/unit_test/test_maintainer.php diff -u -p appdb/unit_test/test_maintainer.php:1.5 appdb/unit_test/test_maintainer.php:1.6 --- appdb/unit_test/test_maintainer.php:1.5 27 Jan 2007 22:58:58 -0000 +++ appdb/unit_test/test_maintainer.php 27 Jan 2007 22:58:58 -0000 @@ -302,6 +302,8 @@ function test_superMaintainerOnAppSubmit
Maintainer::deleteMaintainer($oUser, $iAppId);
+ $oApp->delete(); + return true; }
Index: appdb/unit_test/test_url.php diff -u -p appdb/unit_test/test_url.php:1.1 appdb/unit_test/test_url.php:1.2 --- appdb/unit_test/test_url.php:1.1 27 Jan 2007 22:58:58 -0000 +++ appdb/unit_test/test_url.php 27 Jan 2007 22:58:58 -0000 @@ -14,8 +14,7 @@ function test_url_update() $bSuccess = true; // default to success until we detect failure
/* Log in */ - $oUser = new User(); - if($retval = $oUser->login($test_email, $test_password) != SUCCESS) + if(!$oUser = create_and_login_user()) { echo "Received '$retval' instead of SUCCESS('".SUCCESS."')."; return FALSE; @@ -61,6 +60,7 @@ function test_url_update() }
$oUrl->delete(TRUE); + $oUser->delete();
return $bSuccess; }