Commit 995d1acb6cfe9e08838893ef98e923e1ecb63fbd

Authored by nbm
1 parent e176d140

Non-automated helper tests for workflow stuff.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3828 c91229c3-7414-0410-bfa2-8a42b809f60b
tests/workflow/getByDocument.php 0 → 100644
  1 +<?php
  2 +
  3 +require_once('../../config/dmsDefaults.php');
  4 +
  5 +require_once(KT_LIB_DIR . '/documentmanagement/Document.inc');
  6 +require_once(KT_LIB_DIR . '/workflow/workflow.inc.php');
  7 +require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php');
  8 +
  9 +$oDocument =& Document::get(4);
  10 +
  11 +$res = KTWorkflow::getByDocument($oDocument);
  12 +if (PEAR::isError($res)) {
  13 + print "FAILED\n";
  14 + var_dump($res);
  15 +}
  16 +$iWorkflowId = $res->getId();
  17 +if ($iWorkflowId != 1) {
  18 + print "FAILED\n";
  19 + print $iWorkflowId;
  20 +}
tests/workflow/startWorkflowOnObject.php 0 → 100644
  1 +<?php
  2 +
  3 +require_once('../../config/dmsDefaults.php');
  4 +
  5 +require_once(KT_LIB_DIR . '/documentmanagement/Document.inc');
  6 +require_once(KT_LIB_DIR . '/workflow/workflow.inc.php');
  7 +require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php');
  8 +
  9 +$oDocument =& Document::get(4);
  10 +$oWorkflow =& KTWorkflow::get(1);
  11 +
  12 +$res = KTWorkflowUtil::startWorkflowOnDocument($oWorkflow, $oDocument);
  13 +if (PEAR::isError($res)) {
  14 + var_dump($res);
  15 +}