Se agregan unit test para OUTPUT DOCUMENTS, PROCESS CATEGORY, INPUTDOCUMENTS y se agregan validaciones para OUTPUT DOCUMENTS y PROCESS CATEGORY.
This commit is contained in:
@@ -56,6 +56,10 @@ class OutputDocument
|
||||
public function getCasesOutputDocument($applicationUid, $userUid, $applicationDocumentUid)
|
||||
{
|
||||
try {
|
||||
$oAppDocument = \AppDocumentPeer::retrieveByPK( $applicationDocumentUid, 1 );
|
||||
if (is_null( $oAppDocument ) || $oAppDocument->getAppDocStatus() == 'DELETED') {
|
||||
throw (new \Exception('This output document with id: '.$applicationDocumentUid.' doesn\'t exist!'));
|
||||
}
|
||||
$sApplicationUID = $applicationUid;
|
||||
$sUserUID = $userUid;
|
||||
\G::LoadClass('case');
|
||||
|
||||
@@ -282,7 +282,10 @@ class ProcessCategory
|
||||
public function addCategory($cat_name)
|
||||
{
|
||||
try {
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes". PATH_SEP . "model" . PATH_SEP . "ProcessCategory.php");
|
||||
if ($cat_name == '') {
|
||||
throw (new \Exception( 'cat_name. Process Category name can\'t be null'));
|
||||
}
|
||||
$catName = trim( $cat_name );
|
||||
if ($this->existsName( $cat_name )) {
|
||||
throw (new \Exception( 'cat_name. Duplicate Process Category name'));
|
||||
@@ -312,7 +315,7 @@ class ProcessCategory
|
||||
public function updateCategory($cat_uid, $cat_name)
|
||||
{
|
||||
try {
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes". PATH_SEP . "model" . PATH_SEP . "ProcessCategory.php");
|
||||
$catUID = $cat_uid;
|
||||
$catName = trim( $cat_name );
|
||||
if ($this->existsName( $cat_name )) {
|
||||
|
||||
Reference in New Issue
Block a user