appdb/unit_test test_om_objects.php
WineHQ
wineowner at wine.codeweavers.com
Sun Jul 29 11:01:26 CDT 2007
ChangeSet ID: 31285
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/07/29 11:01:26
Modified files:
unit_test : test_om_objects.php
Log message:
Chris Morgan <cmorgan at alum.wpi.edu>
Call $oObject->objectGetId() to retrieve an object's id instead of directly accessing the
objects member variables
Patch: http://cvs.winehq.org/patch.py?id=31285
Old revision New revision Changes Path
1.19 1.20 +1 -36 appdb/unit_test/test_om_objects.php
Index: appdb/unit_test/test_om_objects.php
diff -u -p appdb/unit_test/test_om_objects.php:1.19 appdb/unit_test/test_om_objects.php:1.20
--- appdb/unit_test/test_om_objects.php:1.19 29 Jul 2007 16: 1:26 -0000
+++ appdb/unit_test/test_om_objects.php 29 Jul 2007 16: 1:26 -0000
@@ -68,42 +68,7 @@ function test_class($sClassName, $aTestM
}
$oNewTestObject = new $sClassName(null, $oRow);
- switch($sClassName)
- {
- case "application":
- $iReceived = $oNewTestObject->iAppId;
- break;
- case "application_queue":
- $iReceived = $oNewTestObject->oApp->iAppId;
- break;
- case "distribution":
- $iReceived = $oNewTestObject->iDistributionId;
- break;
- case "downloadurl":
- $iReceived = $oNewTestObject->iId;
- break;
- case "maintainer":
- $iReceived = $oNewTestObject->iMaintainerId;
- break;
- case "testData":
- $iReceived = $oNewTestObject->iTestingId;
- break;
- case "testData_queue":
- $iReceived = $oNewTestObject->oTestData->iTestingId;
- break;
- case "vendor":
- $iReceived = $oNewTestObject->iVendorId;
- break;
- case "version":
- $iReceived = $oNewTestObject->iVersionId;
- break;
- case "version_queue":
- $iReceived = $oNewTestObject->oVersion->iVersionId;
- break;
- case "screenshot":
- $iReceived = $oNewTestObject->iScreenshotId;
- break;
- }
+ $iReceived = $oNewTestObject->objectGetId();
if(!$iReceived || !is_numeric($iReceived))
{
More information about the wine-cvs
mailing list