Commit 4e96574b99de7a342d1bb1d6335493fc58ffa353

Authored by rob
1 parent 5e607835

Initial revision. Unit test for DocumentFieldLink class in /lib/documentmanagem…

…ent/DocumentFieldLink.inc


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@349 c91229c3-7414-0410-bfa2-8a42b809f60b
tests/documentmanagement/documentFieldLink.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/documentmanagement/DocumentFieldLink.inc");
  15 +
  16 + $oDocumentFieldLink = & new DocumentFieldLink(1, 1, "test");
  17 + echo "Create ? " . ($oDocumentFieldLink->create() ? "Yes" : "No") . "<br>";
  18 + $oDocumentFieldLink = & new DocumentFieldLink(1, 1, "test");
  19 + $oDocumentFieldLink->create();
  20 + echo "Update ? " . ($oDocumentFieldLink->update() ? "Yes" : "No") . "<br>";
  21 + echo "Delete ? " . ($oDocumentFieldLink->delete() ? "Yes" : "No") . "<br>";
  22 + $oNewDocumentFieldLink = DocumentFieldLink::get(1);
  23 + echo "Get ? <pre>" . var_dump($oNewDocumentFieldLink) . "</pre>";
  24 +}
  25 +
  26 +?>