[pLog-svn] r6668 - in plog/branches/lifetype-1.2/class: dao test/tests/ui
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Jun 23 16:57:35 EDT 2008
Author: jondaley
Date: 2008-06-23 16:57:35 -0400 (Mon, 23 Jun 2008)
New Revision: 6668
Modified:
plog/branches/lifetype-1.2/class/dao/permissions.class.php
plog/branches/lifetype-1.2/class/test/tests/ui/permissionsui_test.class.php
Log:
check return value (I had some stray test permissions left in my installation - maybe due to the die() that used to be in the code) of deletePermission. Also note that deletePermission almost always returns true
Modified: plog/branches/lifetype-1.2/class/dao/permissions.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/permissions.class.php 2008-06-23 20:48:39 UTC (rev 6667)
+++ plog/branches/lifetype-1.2/class/dao/permissions.class.php 2008-06-23 20:57:35 UTC (rev 6668)
@@ -83,6 +83,7 @@
*
* @param id The id of the permission
* @return True if successful or false otherwise
+ * (note, only false on a SQL error, not if the value didn't exist)
*/
function deletePermission( $id )
{
Modified: plog/branches/lifetype-1.2/class/test/tests/ui/permissionsui_test.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/test/tests/ui/permissionsui_test.class.php 2008-06-23 20:48:39 UTC (rev 6667)
+++ plog/branches/lifetype-1.2/class/test/tests/ui/permissionsui_test.class.php 2008-06-23 20:57:35 UTC (rev 6668)
@@ -101,7 +101,8 @@
);
// delete the permission via the API
- $perms->deletePermission( $perm->getId());
+ $res = $perms->deletePermission( $perm->getId() );
+ $this->assertTrue($res, "Couldn't delete core permission via API");
}
/**
More information about the pLog-svn
mailing list