appdb/unit_test test_common.php

WineHQ wineowner at wine.codeweavers.com
Thu Jul 26 09:30:32 CDT 2007


ChangeSet ID:	31278
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/07/26 09:30:32

Modified files:
	unit_test      : test_common.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	Remove explicit user::login() call from create_and_login_user() since user::create() calls
	user::login() if the user creation is successful

Patch: http://cvs.winehq.org/patch.py?id=31278

Old revision  New revision  Changes     Path
 1.3           1.4           +3 -9       appdb/unit_test/test_common.php

Index: appdb/unit_test/test_common.php
diff -u -p appdb/unit_test/test_common.php:1.3 appdb/unit_test/test_common.php:1.4
--- appdb/unit_test/test_common.php:1.3	26 Jul 2007 14:30:32 -0000
+++ appdb/unit_test/test_common.php	26 Jul 2007 14:30:32 -0000
@@ -55,7 +55,9 @@ function create_and_login_user($sTestEma
         $oUser = new User();
     }
 
-    /* create the user */
+    // create the user
+    // NOTE: user::create() will call user::login() to login the user
+    //       if the user creation is successful
     $retval = $oUser->create($sTestEmail, $sTestPassword, "Test user", "20051020");
     if($retval != SUCCESS)
     {
@@ -69,14 +71,6 @@ function create_and_login_user($sTestEma
         return false;
     }
 
-    /* login the user */
-    $retval = $oUser->login($sTestEmail, $sTestPassword);
-    if($retval != SUCCESS)
-    {
-        error("Got '".$retval."' instead of SUCCESS(".SUCCESS.")");
-        return false;
-    }
-     
     return $oUser;
 }
 



More information about the wine-cvs mailing list