Merge remote branch 'upstream/master'
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
||||||
@@ -12,9 +13,9 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.net.php';
|
|||||||
/**
|
/**
|
||||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class classNETTest extends PHPUnit_Framework_TestCase
|
class classNETTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var NET
|
* @var NET
|
||||||
*/
|
*/
|
||||||
@@ -26,7 +27,7 @@ class classNETTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new NET();
|
$this->object = new NET('192.168.11.21');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +36,7 @@ class classNETTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +45,8 @@ class classNETTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('NET'); $this->assertTrue( count($methods) == 14);
|
$methods = get_class_methods('NET');
|
||||||
|
$this->assertTrue(count($methods) == 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -254,5 +257,5 @@ class classNETTest extends PHPUnit_Framework_TestCase
|
|||||||
$r = new ReflectionMethod('NET', 'getErrmsg');
|
$r = new ReflectionMethod('NET', 'getErrmsg');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,8 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('PmTable'); $this->assertTrue( count($methods) == 26);
|
$methods = get_class_methods('PmTable');
|
||||||
|
$this->assertTrue( count($methods) == 26);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -320,7 +321,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[1]->getName() == 'tablesList');
|
$this->assertTrue( $params[1]->getName() == 'tablesList');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue( $params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == true);
|
$this->assertTrue( $params[1]->isOptional () == true);
|
||||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -342,7 +343,8 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testgetPropelSupportedColumnTypes()
|
public function testgetPropelSupportedColumnTypes()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('getPropelSupportedColumnTypes', $methods ), 'exists method getPropelSupportedColumnTypes' );
|
$this->assertTrue( in_array('getPropelSupportedColumnTypes', $methods ),
|
||||||
|
'exists method getPropelSupportedColumnTypes' );
|
||||||
$r = new ReflectionMethod('PmTable', 'getPropelSupportedColumnTypes');
|
$r = new ReflectionMethod('PmTable', 'getPropelSupportedColumnTypes');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
@@ -406,11 +408,11 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[2]->getName() == 'options');
|
$this->assertTrue( $params[2]->getName() == 'options');
|
||||||
$this->assertTrue( $params[2]->isArray() == false);
|
$this->assertTrue( $params[2]->isArray() == false);
|
||||||
$this->assertTrue( $params[2]->isOptional () == true);
|
$this->assertTrue( $params[2]->isOptional () == true);
|
||||||
$this->assertTrue( $params[2]->getDefaultValue() == 'Array');
|
$this->assertTrue( $params[2]->getDefaultValue() == array());
|
||||||
$this->assertTrue( $params[3]->getName() == 'verbose');
|
$this->assertTrue( $params[3]->getName() == 'verbose');
|
||||||
$this->assertTrue( $params[3]->isArray() == false);
|
$this->assertTrue( $params[3]->isArray() == false);
|
||||||
$this->assertTrue( $params[3]->isOptional () == true);
|
$this->assertTrue( $params[3]->isOptional () == true);
|
||||||
$this->assertTrue( $params[3]->getDefaultValue() == '1');
|
$this->assertTrue( $params[3]->getDefaultValue() == '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
||||||
@@ -12,9 +13,9 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.plugin.php';
|
|||||||
/**
|
/**
|
||||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var caseSchedulerPlugin
|
* @var caseSchedulerPlugin
|
||||||
*/
|
*/
|
||||||
@@ -26,7 +27,8 @@ class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new caseSchedulerPlugin();
|
$this->object = new caseSchedulerPlugin('sNamespace', 'sActionId', 'sActionForm',
|
||||||
|
'sActionSave', 'sActionExecute', 'sActionGetFields');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +37,7 @@ class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +46,8 @@ class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('caseSchedulerPlugin'); $this->assertTrue( count($methods) == 1);
|
$methods = get_class_methods('caseSchedulerPlugin');
|
||||||
|
$this->assertTrue(count($methods) == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,5 +79,5 @@ class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($params[5]->isArray() == false);
|
$this->assertTrue($params[5]->isArray() == false);
|
||||||
$this->assertTrue($params[5]->isOptional() == false);
|
$this->assertTrue($params[5]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,8 @@ class classfolderDataTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new folderData();
|
$this->object = new folderData('$sProcessUid', '$sProcessTitle', '$sApplicationUid',
|
||||||
|
'$sApplicationTitle', '$sUserUid', '$sUserLogin', '$sUserFullName');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +44,8 @@ class classfolderDataTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('folderData'); $this->assertTrue( count($methods) == 1);
|
$methods = get_class_methods('folderData');
|
||||||
|
$this->assertTrue( count($methods) == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,5 +82,5 @@ class classfolderDataTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[6]->isOptional () == true);
|
$this->assertTrue( $params[6]->isOptional () == true);
|
||||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class InvalidIndexSearchTextException extends Exception
|
|||||||
* @author Herbert Saal Gutierrez
|
* @author Herbert Saal Gutierrez
|
||||||
*
|
*
|
||||||
* @category Colosa
|
* @category Colosa
|
||||||
* @copyright Copyright (c) 2005-2011 Colosa Inc. (http://www.colosa.com)
|
* @copyright Copyright (c) 2005-2012 Colosa Inc. (http://www.colosa.com)
|
||||||
*/
|
*/
|
||||||
class ApplicationWithoutDelegationRecordsException extends Exception
|
class ApplicationWithoutDelegationRecordsException extends Exception
|
||||||
{
|
{
|
||||||
@@ -85,6 +85,31 @@ class ApplicationWithoutDelegationRecordsException extends Exception
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application APP_DATA could not be unserialized exception
|
||||||
|
*
|
||||||
|
* @author Herbert Saal Gutierrez
|
||||||
|
*
|
||||||
|
* @category Colosa
|
||||||
|
* @copyright Copyright (c) 2005-2012 Colosa Inc. (http://www.colosa.com)
|
||||||
|
*/
|
||||||
|
class ApplicationAPP_DATAUnserializeException extends Exception
|
||||||
|
{
|
||||||
|
// Redefine the exception so message isn't optional
|
||||||
|
public function __construct($message, $code = 0)
|
||||||
|
{
|
||||||
|
// some code
|
||||||
|
// make sure everything is assigned properly
|
||||||
|
parent::__construct ($message, $code);
|
||||||
|
}
|
||||||
|
|
||||||
|
// custom string representation of object
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation to display application data in the PMOS2 grids using Solr
|
* Implementation to display application data in the PMOS2 grids using Solr
|
||||||
* search service
|
* search service
|
||||||
@@ -1015,11 +1040,23 @@ class AppSolr
|
|||||||
$unassignedUsers = $result [11];
|
$unassignedUsers = $result [11];
|
||||||
$unassignedGroups = $result [12];
|
$unassignedGroups = $result [12];
|
||||||
|
|
||||||
|
try {
|
||||||
// create document
|
// create document
|
||||||
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
||||||
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
||||||
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
||||||
$unassignedUsers, $unassignedGroups);
|
$unassignedUsers, $unassignedGroups);
|
||||||
|
}
|
||||||
|
catch ( ApplicationAPP_DATAUnserializeException $e ) {
|
||||||
|
// exception trying to get application information
|
||||||
|
|
||||||
|
//print $e->message +" \n";
|
||||||
|
//$fh = fopen("./UnserializeError_APP_DATA".".txt", 'a') or die("can't open file");
|
||||||
|
//fwrite($fh, $e->message . "\n");
|
||||||
|
//fclose($fh);
|
||||||
|
// skip and continue with the next application
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1288,7 +1325,7 @@ class AppSolr
|
|||||||
|
|
||||||
if (! $UnSerializedCaseData) {
|
if (! $UnSerializedCaseData) {
|
||||||
// error unserializing
|
// error unserializing
|
||||||
throw new Exception ("Unserialize APP_DATA error. APP_UID: " . $documentData ['APP_UID']);
|
throw new ApplicationAPP_DATAUnserializeException ("Could not unserialize APP_DATA of APP_UID: " . $documentData ['APP_UID']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($UnSerializedCaseData as $k => $value) {
|
foreach ($UnSerializedCaseData as $k => $value) {
|
||||||
@@ -1390,7 +1427,7 @@ class AppSolr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // foreach unserialized data
|
} // foreach unserialized data
|
||||||
}
|
}// else unserialize APP_DATA
|
||||||
} // empty APP_DATA
|
} // empty APP_DATA
|
||||||
|
|
||||||
$writer->endElement (); // end /doc
|
$writer->endElement (); // end /doc
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ try {
|
|||||||
|
|
||||||
$userUid = (isset ( $_SESSION ['USER_LOGGED'] ) && $_SESSION ['USER_LOGGED'] != '') ? $_SESSION ['USER_LOGGED'] : null;
|
$userUid = (isset ( $_SESSION ['USER_LOGGED'] ) && $_SESSION ['USER_LOGGED'] != '') ? $_SESSION ['USER_LOGGED'] : null;
|
||||||
|
|
||||||
if ((($solrConf = System::solrEnv()) !== false) && $action != 'paused') {
|
if (($action == 'todo' || $action == 'draft' || $action == 'sent' || $action == 'selfservice' || $action == 'unassigned' || $action == 'search') && (($solrConf = System::solrEnv()) !== false)) {
|
||||||
G::LoadClass ( 'AppSolr' );
|
G::LoadClass ( 'AppSolr' );
|
||||||
$ApplicationSolrIndex = new AppSolr ($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
|
$ApplicationSolrIndex = new AppSolr ($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user