Merge remote branch 'upstream/master'
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?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.xmlDocument.php';
|
||||
@@ -11,248 +12,250 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.net.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
*/
|
||||
class classNETTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var NET
|
||||
*/
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new NET();
|
||||
$this->object = new NET('192.168.11.21');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the default method to test, if the class still having
|
||||
* the same number of methods.
|
||||
*/
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('NET'); $this->assertTrue( count($methods) == 14);
|
||||
$methods = get_class_methods('NET');
|
||||
$this->assertTrue(count($methods) == 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::__construct
|
||||
* @todo Implement test__construct().
|
||||
*/
|
||||
* @covers NET::__construct
|
||||
* @todo Implement test__construct().
|
||||
*/
|
||||
public function test__construct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||
$this->assertTrue(in_array('__construct', $methods), 'exists method __construct');
|
||||
$r = new ReflectionMethod('NET', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::resolv
|
||||
* @todo Implement testresolv().
|
||||
*/
|
||||
* @covers NET::resolv
|
||||
* @todo Implement testresolv().
|
||||
*/
|
||||
public function testresolv()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('resolv', $methods ), 'exists method resolv' );
|
||||
$this->assertTrue(in_array('resolv', $methods), 'exists method resolv');
|
||||
$r = new ReflectionMethod('NET', 'resolv');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::scannPort
|
||||
* @todo Implement testscannPort().
|
||||
*/
|
||||
* @covers NET::scannPort
|
||||
* @todo Implement testscannPort().
|
||||
*/
|
||||
public function testscannPort()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('scannPort', $methods ), 'exists method scannPort' );
|
||||
$this->assertTrue(in_array('scannPort', $methods), 'exists method scannPort');
|
||||
$r = new ReflectionMethod('NET', 'scannPort');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pPort');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pPort');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::is_ipaddress
|
||||
* @todo Implement testis_ipaddress().
|
||||
*/
|
||||
* @covers NET::is_ipaddress
|
||||
* @todo Implement testis_ipaddress().
|
||||
*/
|
||||
public function testis_ipaddress()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('is_ipaddress', $methods ), 'exists method is_ipaddress' );
|
||||
$this->assertTrue(in_array('is_ipaddress', $methods), 'exists method is_ipaddress');
|
||||
$r = new ReflectionMethod('NET', 'is_ipaddress');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::ping
|
||||
* @todo Implement testping().
|
||||
*/
|
||||
* @covers NET::ping
|
||||
* @todo Implement testping().
|
||||
*/
|
||||
public function testping()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('ping', $methods ), 'exists method ping' );
|
||||
$this->assertTrue(in_array('ping', $methods), 'exists method ping');
|
||||
$r = new ReflectionMethod('NET', 'ping');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pTTL');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '3000');
|
||||
$this->assertTrue($params[0]->getName() == 'pTTL');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == true);
|
||||
$this->assertTrue($params[0]->getDefaultValue() == '3000');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::loginDbServer
|
||||
* @todo Implement testloginDbServer().
|
||||
*/
|
||||
* @covers NET::loginDbServer
|
||||
* @todo Implement testloginDbServer().
|
||||
*/
|
||||
public function testloginDbServer()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loginDbServer', $methods ), 'exists method loginDbServer' );
|
||||
$this->assertTrue(in_array('loginDbServer', $methods), 'exists method loginDbServer');
|
||||
$r = new ReflectionMethod('NET', 'loginDbServer');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pUser');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'pPasswd');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pUser');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pPasswd');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::setDataBase
|
||||
* @todo Implement testsetDataBase().
|
||||
*/
|
||||
* @covers NET::setDataBase
|
||||
* @todo Implement testsetDataBase().
|
||||
*/
|
||||
public function testsetDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setDataBase', $methods ), 'exists method setDataBase' );
|
||||
$this->assertTrue(in_array('setDataBase', $methods), 'exists method setDataBase');
|
||||
$r = new ReflectionMethod('NET', 'setDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pDb');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'pPort');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue($params[0]->getName() == 'pDb');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pPort');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::tryConnectServer
|
||||
* @todo Implement testtryConnectServer().
|
||||
*/
|
||||
* @covers NET::tryConnectServer
|
||||
* @todo Implement testtryConnectServer().
|
||||
*/
|
||||
public function testtryConnectServer()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('tryConnectServer', $methods ), 'exists method tryConnectServer' );
|
||||
$this->assertTrue(in_array('tryConnectServer', $methods), 'exists method tryConnectServer');
|
||||
$r = new ReflectionMethod('NET', 'tryConnectServer');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::tryOpenDataBase
|
||||
* @todo Implement testtryOpenDataBase().
|
||||
*/
|
||||
* @covers NET::tryOpenDataBase
|
||||
* @todo Implement testtryOpenDataBase().
|
||||
*/
|
||||
public function testtryOpenDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('tryOpenDataBase', $methods ), 'exists method tryOpenDataBase' );
|
||||
$this->assertTrue(in_array('tryOpenDataBase', $methods), 'exists method tryOpenDataBase');
|
||||
$r = new ReflectionMethod('NET', 'tryOpenDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getDbServerVersion
|
||||
* @todo Implement testgetDbServerVersion().
|
||||
*/
|
||||
* @covers NET::getDbServerVersion
|
||||
* @todo Implement testgetDbServerVersion().
|
||||
*/
|
||||
public function testgetDbServerVersion()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDbServerVersion', $methods ), 'exists method getDbServerVersion' );
|
||||
$this->assertTrue(in_array('getDbServerVersion', $methods), 'exists method getDbServerVersion');
|
||||
$r = new ReflectionMethod('NET', 'getDbServerVersion');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'driver');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'driver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::dbName
|
||||
* @todo Implement testdbName().
|
||||
*/
|
||||
* @covers NET::dbName
|
||||
* @todo Implement testdbName().
|
||||
*/
|
||||
public function testdbName()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('dbName', $methods ), 'exists method dbName' );
|
||||
$this->assertTrue(in_array('dbName', $methods), 'exists method dbName');
|
||||
$r = new ReflectionMethod('NET', 'dbName');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pAdapter');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'pAdapter');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::showMsg
|
||||
* @todo Implement testshowMsg().
|
||||
*/
|
||||
* @covers NET::showMsg
|
||||
* @todo Implement testshowMsg().
|
||||
*/
|
||||
public function testshowMsg()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('showMsg', $methods ), 'exists method showMsg' );
|
||||
$this->assertTrue(in_array('showMsg', $methods), 'exists method showMsg');
|
||||
$r = new ReflectionMethod('NET', 'showMsg');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getErrno
|
||||
* @todo Implement testgetErrno().
|
||||
*/
|
||||
* @covers NET::getErrno
|
||||
* @todo Implement testgetErrno().
|
||||
*/
|
||||
public function testgetErrno()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getErrno', $methods ), 'exists method getErrno' );
|
||||
$this->assertTrue(in_array('getErrno', $methods), 'exists method getErrno');
|
||||
$r = new ReflectionMethod('NET', 'getErrno');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getErrmsg
|
||||
* @todo Implement testgetErrmsg().
|
||||
*/
|
||||
* @covers NET::getErrmsg
|
||||
* @todo Implement testgetErrmsg().
|
||||
*/
|
||||
public function testgetErrmsg()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getErrmsg', $methods ), 'exists method getErrmsg' );
|
||||
$this->assertTrue(in_array('getErrmsg', $methods), 'exists method getErrmsg');
|
||||
$r = new ReflectionMethod('NET', 'getErrmsg');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
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]->isArray() == false);
|
||||
$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()
|
||||
{
|
||||
$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');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -406,11 +408,11 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[2]->getName() == 'options');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$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]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '1');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?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.xmlDocument.php';
|
||||
@@ -11,69 +12,72 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.plugin.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
*/
|
||||
class classcaseSchedulerPluginTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var caseSchedulerPlugin
|
||||
*/
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new caseSchedulerPlugin();
|
||||
$this->object = new caseSchedulerPlugin('sNamespace', 'sActionId', 'sActionForm',
|
||||
'sActionSave', 'sActionExecute', 'sActionGetFields');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the default method to test, if the class still having
|
||||
* the same number of methods.
|
||||
*/
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('caseSchedulerPlugin'); $this->assertTrue( count($methods) == 1);
|
||||
$methods = get_class_methods('caseSchedulerPlugin');
|
||||
$this->assertTrue(count($methods) == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers caseSchedulerPlugin::__construct
|
||||
* @todo Implement test__construct().
|
||||
*/
|
||||
* @covers caseSchedulerPlugin::__construct
|
||||
* @todo Implement test__construct().
|
||||
*/
|
||||
public function test__construct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||
$this->assertTrue(in_array('__construct', $methods), 'exists method __construct');
|
||||
$r = new ReflectionMethod('caseSchedulerPlugin', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sActionId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sActionForm');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sActionSave');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'sActionExecute');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
$this->assertTrue( $params[5]->getName() == 'sActionGetFields');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sActionId');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'sActionForm');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == false);
|
||||
$this->assertTrue($params[3]->getName() == 'sActionSave');
|
||||
$this->assertTrue($params[3]->isArray() == false);
|
||||
$this->assertTrue($params[3]->isOptional() == false);
|
||||
$this->assertTrue($params[4]->getName() == 'sActionExecute');
|
||||
$this->assertTrue($params[4]->isArray() == false);
|
||||
$this->assertTrue($params[4]->isOptional() == false);
|
||||
$this->assertTrue($params[5]->getName() == 'sActionGetFields');
|
||||
$this->assertTrue($params[5]->isArray() == false);
|
||||
$this->assertTrue($params[5]->isOptional() == false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ class classfolderDataTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
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()
|
||||
{
|
||||
$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]->getDefaultValue() == '');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class InvalidIndexSearchTextException extends Exception
|
||||
* @author Herbert Saal Gutierrez
|
||||
*
|
||||
* @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
|
||||
{
|
||||
@@ -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
|
||||
* search service
|
||||
@@ -1015,11 +1040,23 @@ class AppSolr
|
||||
$unassignedUsers = $result [11];
|
||||
$unassignedGroups = $result [12];
|
||||
|
||||
// create document
|
||||
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
||||
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
||||
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
||||
$unassignedUsers, $unassignedGroups);
|
||||
try {
|
||||
// create document
|
||||
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
||||
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
||||
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
||||
$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) {
|
||||
// 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 {
|
||||
foreach ($UnSerializedCaseData as $k => $value) {
|
||||
@@ -1390,7 +1427,7 @@ class AppSolr
|
||||
}
|
||||
}
|
||||
} // foreach unserialized data
|
||||
}
|
||||
}// else unserialize APP_DATA
|
||||
} // empty APP_DATA
|
||||
|
||||
$writer->endElement (); // end /doc
|
||||
|
||||
@@ -22,7 +22,7 @@ try {
|
||||
|
||||
$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' );
|
||||
$ApplicationSolrIndex = new AppSolr ($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user