[AppDB] - user class cleanup and implement user class unit test
Chris Morgan
cmorgan at alum.wpi.edu
Mon Jun 26 14:33:17 CDT 2006
This patch cleans up the user class and implements a unit test for it. To
simplify the implementation of the unit tests I had to modify the behavior of
update() a bit to make it similar to how we update() other classes. I split
password updating out into another function because we can't really have a
member variable that holds the current user password. I also added explicit
failure and success values for user::login()/update()/create() so the
addmsg() calls could be moved out of the class and into the display code
where they belong and so we would get more finely defined failure values.
The attached files go into appdb/unit_test, a new directory that doesn't yet
exist in cvs.
You can run the tests by running 'run_tests' in the unit_test directory.
Comments? Questions?
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user_cleanup.patch
Type: text/x-diff
Size: 9994 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060626/7a3f969a/user_cleanup-0001.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: path.php
Type: application/x-php
Size: 31 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060626/7a3f969a/path-0001.bin
-------------- next part --------------
php -f run_tests.php
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_tests.php
Type: application/x-php
Size: 178 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060626/7a3f969a/run_tests-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_user.php
Type: application/x-php
Size: 7137 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060626/7a3f969a/test_user-0001.bin
More information about the wine-patches
mailing list