Commit dcba4f2f889cfddaa3d3e671ff92136e766a4a85

Authored by rob
1 parent 0bfac275

Initial revision. Unit tests for WebDocument class in /lib/webl/WebDocument.inc


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@355 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 26 additions and 0 deletions
tests/web/webDocument.php 0 → 100644
  1 +<?php
  2 +
  3 +/**
  4 +* Unit test for class DocumentField found in /lib/documentmanagement/DocumentField.inc
  5 +*
  6 +* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
  7 +* @date 19 January 2003
  8 +*
  9 +*/
  10 +
  11 +require_once("../../config/dmsDefaults.php");
  12 +
  13 +if (checkSession) {
  14 + require_once("$default->owl_fs_root/lib/web/WebDocument.inc");
  15 +
  16 + $oWebDocument = & new WebDocument(1, 1, 1, 1, getCurrentDateTime());
  17 + echo "Create ? " . ($oWebDocument->create() ? "Yes" : "No") . "<br>";
  18 + $oWebDocument = & new WebDocument(1, 1, 1, 1, getCurrentDateTime());
  19 + $oWebDocument->create();
  20 + echo "Update ? " . ($oWebDocument->update() ? "Yes" : "No") . "<br>";
  21 + echo "Delete ? " . ($oWebDocument->delete() ? "Yes" : "No") . "<br>";
  22 + $oNewDocumentField = WebDocument::get(1);
  23 + echo "Get ? <pre>" . var_dump($oNewDocumentField) . "</pre>";
  24 +}
  25 +
  26 +?>
... ...