diff --git a/tests/subscriptions/subscription.php b/tests/subscriptions/subscription.php deleted file mode 100644 index 616390c..0000000 --- a/tests/subscriptions/subscription.php +++ /dev/null @@ -1,130 +0,0 @@ -fileSystemRoot/lib/subscriptions/Subscription.inc"); - - echo "Testing creation of new folder subscription object
"; - $oFolderSubscription = & new Subscription(1, 1, SubscriptionConstants::subscriptionType("FolderSubscription")); - if (isset($oFolderSubscription)) { - echo "Passed folder subscription creation test

"; - - echo "Testing getting and setting of values

"; - - echo "Current value of primary key: " . $oFolderSubscription->getID() . "
"; - echo "This value CANNOT be altered manually

"; - - echo "Current value of folder subscription user id: " . $oFolderSubscription->getUserID() . "
"; - echo "Setting folder subscription user id to: 23
"; - $oFolderSubscription->setUserID(23); - echo "New value of folder subscription user id: " . $oFolderSubscription->getUserID() . "

"; - - echo "Current value of folder subscription folder id: " . $oFolderSubscription->getExternalID() . "
"; - echo "Setting folder subscription folder id to 56
"; - $oFolderSubscription->getExternalID(56); - echo "New folder subscription folder id: " . $oFolderSubscription->getExternalID() . "

"; - - echo "Testing storing of object in database
"; - if ($oFolderSubscription->create()) { - echo "Passed storing of object in database test

"; - - echo "Testing object updating
"; - if ($oFolderSubscription->update()) { - echo "Passed object updating test

"; - - echo "Testing getting of object from database using primary key
"; - $oNewFolderSubscription = & Subscription::get($oFolderSubscription->getID(), SubscriptionConstants::subscriptionType("FolderSubscription")); - if (isset($oNewFolderSubscription)) { - echo "
 " . arrayToString($oNewFolderSubscription) . "

"; - echo "Passed getting of object from db using primary key

"; - - echo "Testing deletion of object from database
"; - if ($oFolderSubscription->delete()) { - echo "Passed deletion of object from database test.

END OF UNIT TEST"; - } else { - echo "Failed deletion of object from database test(" . $_SESSION["errorMessage"] . ")"; - } - } else { - echo "Failed getting of object test(" . $_SESSION["errorMessage"] . ").
Tests not run (a)deletion of object
"; - } - } else { - echo "Failed object updating test(" . $_SESSION["errorMessage"] . ").
Tests not run (a)deletion of object (b)getting of object using id
"; - } - } else { - echo "Failed storing of object in database test (" . $_SESSION["errorMessage"] . ").
Tests not run (a)updating of object (b)deletion of object (c)getting of object using id
"; - } - } else { - echo "Failed folder subscription creation tests(" . $_SESSION["errorMessage"] . ").
Tests not run: (a)setting/getting of values (b)storing of object (c)updating of object (d)deletion of object (e)getting of object using id
"; - } - - echo "

"; - - echo "Testing creation of new document subscription object
"; - $oDocumentSubscription = & new Subscription(1, 1, SubscriptionConstants::subscriptionType("DocumentSubscription")); - - if (isset($oDocumentSubscription)) { - echo "Passed document subscription creation test

"; - - echo "Testing getting and setting of values

"; - - echo "Current value of primary key: " . $oDocumentSubscription->getID() . "
"; - echo "This value CANNOT be altered manually

"; - - echo "Current value of document subscription user id: " . $oDocumentSubscription->getUserID() . "
"; - echo "Setting document subscription user id to: 12
"; - $oDocumentSubscription->setUserID(12); - echo "New value of document subscription user id: " . $oDocumentSubscription->getUserID() . "

"; - - echo "Current value of document subscription document id: " . $oDocumentSubscription->getExternalID() . "
"; - echo "Setting document subscription document id to 34
"; - $oDocumentSubscription->getExternalID(34); - echo "New document subscription document id: " . $oDocumentSubscription->getExternalID() . "

"; - - echo "Testing storing of object in database
"; - if ($oDocumentSubscription->create()) { - echo "Passed storing of object in database test

"; - - echo "Testing object updating
"; - if ($oDocumentSubscription->update()) { - echo "Passed object updating test

"; - - echo "Testing getting of object from database using primary key
"; - $oNewDocumentSubscription = & Subscription::get($oDocumentSubscription->getID(), SubscriptionConstants::subscriptionType("DocumentSubscription")); - if (isset($oNewDocumentSubscription)) { - echo "
 " . arrayToString($oNewDocumentSubscription) . "

"; - echo "Passed getting of object from db using primary key

"; - - echo "Testing deletion of object from database
"; - if ($oDocumentSubscription->delete()) { - echo "Passed deletion of object from database test.

END OF UNIT TEST"; - } else { - echo "Failed deletion of object from database test"; - } - } else { - echo "Failed getting of object test.
Tests not run (a)deletion of object
"; - } - } else { - echo "Failed object updating test.
Tests not run (a)deletion of object (b)getting of object using id
"; - } - } else { - echo "Failed storing of object in database test.
Tests not run (a)updating of object (b)deletion of object (c)getting of object using id
"; - } - } else { - echo "Failed document subscription creation tests.
Tests not run: (a)setting/getting of values (b)storing of object (c)updating of object (d)deletion of object (e)getting of object using id
"; - } -} - -?> diff --git a/tests/subscriptions/subscriptionEngine.php b/tests/subscriptions/subscriptionEngine.php deleted file mode 100644 index 2c0b0a9..0000000 --- a/tests/subscriptions/subscriptionEngine.php +++ /dev/null @@ -1,106 +0,0 @@ -fileSystemRoot/lib/subscriptions/SubscriptionManager.inc"); - require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc"); - $oSubscriptionManager = new SubscriptionManager(); - - echo ""; - - /* - // cleanup silently - for ($i = 1; $i<=10; $i++) { - if ($i<=5) { - $oSubscriptionManager->removeSubscription($i, $iFolderID, SubscriptionConstants::subscriptionType("FolderSubscription")); - } else { - $oSubscriptionManager->removeSubscription($i, $iDocumentID, SubscriptionConstants::subscriptionType("DocumentSubscription")); - } -} - */ -} -?> diff --git a/tests/subscriptions/subscriptionManager.php b/tests/subscriptions/subscriptionManager.php deleted file mode 100644 index 98e1ced..0000000 --- a/tests/subscriptions/subscriptionManager.php +++ /dev/null @@ -1,88 +0,0 @@ -fileSystemRoot/lib/subscriptions/SubscriptionManager.inc"); - $oSubscriptionManager = new SubscriptionManager(); - echo "Testing folder subscriptions
"; - $iFolderID = 1; - $iUserID = 1; - echo "Testing document subscriptions
"; - $iDocumentID = 6; - $iUserID = 1; - echo ""; - } - - echo "Testing subscription retrieval
"; - // first create some subscriptions - $iUserID = 10; - echo ""; - - // cleanup silently - for ($i = 1; $i<=5; $i++) { - $oSubscriptionManager->removeSubscription($iUserID, $i, SubscriptionConstants::subscriptionType("FolderSubscription")); - $oSubscriptionManager->removeSubscription($iUserID, $i, SubscriptionConstants::subscriptionType("DocumentSubscription")); - - $oSubscriptionManager->removeSubscription($i, $iFolderID,SubscriptionConstants::subscriptionType("FolderSubscription") ); - $oSubscriptionManager->removeSubscription($i, $iDocumentID, SubscriptionConstants::subscriptionType("DocumentSubscription")); - } -} -?> diff --git a/tests/units/unit.php b/tests/units/unit.php deleted file mode 100644 index edd46f3..0000000 --- a/tests/units/unit.php +++ /dev/null @@ -1,45 +0,0 @@ -fileSystemRoot/lib/unitmanagement/Unit.inc"); - - $oUnit = & new Unit("test unit20"); - echo "Create ? " . ($oUnit->create() ? "Yes" : "No") . "
"; - //$oUnit = & new Unit("test unit"); - //$oUnit->create(); - //$oUnit = & new Unit("test unit2"); - //$oUnit->create(); - //$oUnit = & new Unit("test unit"); - //$oUnit->create(); - //$oUnit->setName("suckaaa"); - - //echo $oUnit->iId; - // - //$oUnit->getUnitID("test unit20"); - ///$oUnit->create(); - $oUnit->setName("test unit200000"); - echo "Update ? " . ($oUnit->update() ? "Yes" : "No") . "
"; - - //echo "Delete ? " . ($oUnit->delete() ? "Yes" : "No") . "
"; - - /*$oNewUnit = Unit::get(1); - echo "Get ?
" . print_r($oNewUnit) . "
"; - $oNewUnit = Unit::getList(); - echo "GetList ?
" . print_r($oNewUnit) . "
"; - $oNewUnit = Unit::getList("WHERE id > 2"); - echo "GetList ?
" . print_r($oNewUnit) . "
"; - */ -} - -?> diff --git a/tests/users/user.php b/tests/users/user.php deleted file mode 100644 index 3c6c4ac..0000000 --- a/tests/users/user.php +++ /dev/null @@ -1,40 +0,0 @@ -fileSystemRoot/lib/users/User.inc"); - - $oUser = & new User("johnny", "tester", "test password", 200, "ropb@jamwarehouse.com", "+27 82 422 3685", true, true, "!@#%^&*()", 3, 1); - echo "Create ? " . ($oUser->create() ? "Yes" : "No") . "
"; - $oUser = & new User("walker", "woooh", "test password", 200, "ropb@jamwarehouse.com", "+27 82 422 3685", true, true, "!@#%^&*()", 3, 1); - echo "Create ? " . ($oUser->create() ? "Yes" : "No") . "
"; - //$oUser = & new User("test login name", "test name", "test password", 200, "ropb@jamwarehouse.com", "+27 82 422 3685", true, true, "!@#%^&*()", 3, 1); - //$oUser->create(); - //$oUser = & new User("test login name", "test name", "test password", 200, "ropb@jamwarehouse.com", "+27 82 422 3685", true, true, "!@#%^&*()", 3, 1); - //$oUser->create(); - //$oUser = & new User("test login name", "test name", "test password", 200, "ropb@jamwarehouse.com", "+27 82 422 3685", true, true, "!@#%^&*()", 3, 1); - //$oUser->create(); - //echo "Update ? " . ($oUser->update() ? "Yes" : "No") . "
"; - //$oUser->getUserID("sonny"); - echo "Delete ? " . ($oUser->delete() ? "Yes" : "No") . "
"; - //$oNewUser = User::get(1); - //echo "Get ?
" . print_r($oNewUser) . "
"; - //$oNewUser = User::getList(); - //echo "GetList ?
" . print_r($oNewUser) . "
"; - //$oNewUser = User::getList("WHERE id > 3"); - //echo "GetList ?
" . print_r($oNewUser) . "
"; - -} - -?> diff --git a/tests/visualpatterns/listBoxTest.php b/tests/visualpatterns/listBoxTest.php deleted file mode 100644 index 50f4214..0000000 --- a/tests/visualpatterns/listBoxTest.php +++ /dev/null @@ -1,19 +0,0 @@ -fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); - -/** -* Unit test code from PatternListBox class in /lib/visualpatterns/PatternListBox.inc -* -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa -* @date 16 January 2003 -* @package tests.visualpatterns -*/ - - -$oPatternListBox = & new PatternListBox("folders", "name", "id", "folders"); -echo "" . $oPatternListBox->render() . ""; - - -?> diff --git a/tests/visualpatterns/test.php b/tests/visualpatterns/test.php deleted file mode 100644 index e64bfbd..0000000 --- a/tests/visualpatterns/test.php +++ /dev/null @@ -1,38 +0,0 @@ -"www.google.com",1=>"www.yahoo.com",2=>"www.msn.com"); -$aTopMenuText = array(0=>"google",1=>"yahoo",2=>"msn"); -$oPatternTableLinks = new PatternTableLinks($aTopMenuLinks, $aTopMenuText, 3, 1); - -//build the central grid for paging through results -$aCentralPageColumns = array(0=>"name",1=>"parent",2=>"security"); -$aColumnTypes = array(0=>1,1=>2,2=>1); -$oTableSqlQuery = & new PatternTableSqlQuery("Folders", $aCentralPageColumns, $aColumnTypes); -($HTTP_GET_VARS["fStartIndex"]) ? $oTableSqlQuery->setStartIndex($HTTP_GET_VARS["fStartIndex"]) : $oTableSqlQuery->setStartIndex(0); -$oTableSqlQuery->setLinkType(1); - - - -//get a page -$tmp = new PatternMainPage(); - -//put the page together -$tmp->setNorthWestPayload($img); -$tmp->setNorthPayload($oPatternTableLinks); -$tmp->setCentralPayload($oTableSqlQuery); -$tmp->setFormAction("Navigate.inc"); -$tmp->render(); - -?> diff --git a/tests/web/subscription.php b/tests/web/subscription.php deleted file mode 100644 index f1541ed..0000000 --- a/tests/web/subscription.php +++ /dev/null @@ -1,38 +0,0 @@ -fileSystemRoot/lib/web/Subscription.inc"); - - $oSubscription = & new Subscription(1,1); - echo "Create ? " . ($oSubscription->create() ? "Yes" : "No") . "
"; - $oSubscription = & new Subscription(1,1); - $oSubscription->create(); - $oSubscription = & new Subscription(1,1); - $oSubscription->create(); - $oSubscription = & new Subscription(2,1); - $oSubscription->create(); - $oSubscription = & new Subscription(1,1); - $oSubscription->create(); - echo "Update ? " . ($oSubscription->update() ? "Yes" : "No") . "
"; - echo "Delete ? " . ($oSubscription->delete() ? "Yes" : "No") . "
"; - $oNewSubscription = Subscription::get(1); - echo "Get ?
" . print_r($oNewSubscription) . "
"; - $oNewSubscription = Subscription::getList(); - echo "GetList ?
" . print_r($oNewSubscription) . "
"; - $oNewSubscription = Subscription::getList("WHERE user_id = 2"); - echo "GetList ?
" . print_r($oNewSubscription) . "
"; - -} -?> diff --git a/tests/web/webDocument.php b/tests/web/webDocument.php deleted file mode 100644 index e21fa0d..0000000 --- a/tests/web/webDocument.php +++ /dev/null @@ -1,27 +0,0 @@ -fileSystemRoot/lib/web/WebDocument.inc"); - - $oWebDocument = & new WebDocument(1, 1, 1, 1, getCurrentDateTime()); - echo "Create ? " . ($oWebDocument->create() ? "Yes" : "No") . "
"; - $oWebDocument = & new WebDocument(1, 1, 1, 1, getCurrentDateTime()); - $oWebDocument->create(); - echo "Update ? " . ($oWebDocument->update() ? "Yes" : "No") . "
"; - echo "Delete ? " . ($oWebDocument->delete() ? "Yes" : "No") . "
"; - $oNewDocumentField = WebDocument::get(1); - echo "Get ?
" . var_dump($oNewDocumentField) . "
"; -} - -?> diff --git a/tests/web/webSite.php b/tests/web/webSite.php deleted file mode 100644 index ce7b405..0000000 --- a/tests/web/webSite.php +++ /dev/null @@ -1,37 +0,0 @@ -fileSystemRoot/lib/web/WebSite.inc"); - - $oWebSite = & new WebSite("test web !@43&!@*& site", "http://www.google.com", 1); - echo "Create ? " . ($oWebSite->create() ? "Yes" : "No") . "
"; - $oWebSite = & new WebSite("test web !@43&!@*& site", "http://www.google.com", 1); - $oWebSite->create(); - $oWebSite = & new WebSite("test web !@43&!@*& site", "http://www.google.com", 1); - $oWebSite->create(); - $oWebSite = & new WebSite("test web !@43&!@*& site", "http://www.google.com", 1); - $oWebSite->create(); - $oWebSite = & new WebSite("test web !@43&!@*& site", "http://www.google.com", 1); - $oWebSite->create(); - echo "Update ? " . ($oWebSite->update() ? "Yes" : "No") . "
"; - echo "Delete ? " . ($oWebSite->delete() ? "Yes" : "No") . "
"; - $oNewWebSite = WebSite::get(1); - echo "Get ?
" . print_r($oNewWebSite) . "
"; - $aWebSiteList = WebSite::getList(); - echo "List ?
" . print_r($aWebSiteList) . "
"; - -} - -?>