fileSystemRoot/lib/foldermanagement/Folder.inc");
echo "Testing creation of new folder object
";
$oFol = & new Folder("Test folder object", "Test folder's #%&4#@% object", 1, $_SESSION["userID"], 1, 1, false);
if (isset($oFol)) {
echo "Passed folder creation test
";
echo "Testing getting and setting of values
";
echo "Current value of primary key: " . $oFol->getID() . "
";
echo "This value CANNOT be altered manually
";
echo "Current value of folder name: " . $oFol->getName() . "
";
echo "Setting folder name to: 'This is the new !#@@%^U&*()' folder name
";
$oFol->setName("This is the new !#@@%^U&*() folder name");
echo "New value of folder name: " . $oFol->getName() . "
";
echo "Current value of folder description: " . $oFol->getDescription() . "
";
echo "Setting description to '!@?|%&'''^*)*&%#@'
";
$oFol->setDescription("!@?|%&'''^*)*&%#@");
echo "New folder description: " . $oFol->getDescription() . "
";
echo "Current folder parent id: " . $oFol->getParentID() . "
";
echo "Setting the parentid to: 5
";
$oFol->setParentID(5);
echo "New folder parent id: " . $oFol->getParentID() . "
";
echo "Current folder document type id: " . $oFol->getDocumentTypeID() . "
";
echo "Setting folder document type to: 6
";
$oFol->setDocumentTypeID(6);
echo "New folder document type id: " . $oFol->getDocumentTypeID() . "
";
echo "Current folder unit id: " . $oFol->getUnitID() . "
";
echo "Setting the unit type to: 34
";
$oFol->setUnitID(34);
echo "New folder unit id: " . $oFol->getUnitID() . "
";
echo "Current folder public status: " . ($oFol->getIsPublic() == false ? "false
" : "true
");
echo "Setting the folder public status to: true
";
$oFol->setIsPublic(true);
echo "New folder public status: " . $oFol->getIsPublic() . "
";
echo "Testing storing of object in database
";
if ($oFol->create()) {
echo "Passed storing of object in database test
";
echo "Testing object updating
";
if ($oFol->update()) {
echo "Passed object updating test
";
echo "Testing getting of object from database using primary key
";
$oNewFol = & Folder::get($oFol->getID());
if (isset($oNewFol)) {
echo "
" . print_r($oNewFol) . "