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';
|
||||||
@@ -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.
|
* 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
|
||||||
*/
|
*/
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the fixture, for example, opens a network connection.
|
* Sets up the fixture, for example, opens a network connection.
|
||||||
* This method is called before a test is executed.
|
* This method is called before a test is executed.
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
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.
|
* Tears down the fixture, for example, closes a network connection.
|
||||||
* This method is called after a test is executed.
|
* This method is called after a test is executed.
|
||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the default method to test, if the class still having
|
* This is the default method to test, if the class still having
|
||||||
* the same number of methods.
|
* the same number of methods.
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::__construct
|
* @covers NET::__construct
|
||||||
* @todo Implement test__construct().
|
* @todo Implement test__construct().
|
||||||
*/
|
*/
|
||||||
public function test__construct()
|
public function test__construct()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', '__construct');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::resolv
|
* @covers NET::resolv
|
||||||
* @todo Implement testresolv().
|
* @todo Implement testresolv().
|
||||||
*/
|
*/
|
||||||
public function testresolv()
|
public function testresolv()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'resolv');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::scannPort
|
* @covers NET::scannPort
|
||||||
* @todo Implement testscannPort().
|
* @todo Implement testscannPort().
|
||||||
*/
|
*/
|
||||||
public function testscannPort()
|
public function testscannPort()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'scannPort');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pPort');
|
$this->assertTrue($params[0]->getName() == 'pPort');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::is_ipaddress
|
* @covers NET::is_ipaddress
|
||||||
* @todo Implement testis_ipaddress().
|
* @todo Implement testis_ipaddress().
|
||||||
*/
|
*/
|
||||||
public function testis_ipaddress()
|
public function testis_ipaddress()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'is_ipaddress');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pHost');
|
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::ping
|
* @covers NET::ping
|
||||||
* @todo Implement testping().
|
* @todo Implement testping().
|
||||||
*/
|
*/
|
||||||
public function testping()
|
public function testping()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'ping');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pTTL');
|
$this->assertTrue($params[0]->getName() == 'pTTL');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == true);
|
$this->assertTrue($params[0]->isOptional() == true);
|
||||||
$this->assertTrue( $params[0]->getDefaultValue() == '3000');
|
$this->assertTrue($params[0]->getDefaultValue() == '3000');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::loginDbServer
|
* @covers NET::loginDbServer
|
||||||
* @todo Implement testloginDbServer().
|
* @todo Implement testloginDbServer().
|
||||||
*/
|
*/
|
||||||
public function testloginDbServer()
|
public function testloginDbServer()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'loginDbServer');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pUser');
|
$this->assertTrue($params[0]->getName() == 'pUser');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
$this->assertTrue( $params[1]->getName() == 'pPasswd');
|
$this->assertTrue($params[1]->getName() == 'pPasswd');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue($params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue($params[1]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::setDataBase
|
* @covers NET::setDataBase
|
||||||
* @todo Implement testsetDataBase().
|
* @todo Implement testsetDataBase().
|
||||||
*/
|
*/
|
||||||
public function testsetDataBase()
|
public function testsetDataBase()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'setDataBase');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pDb');
|
$this->assertTrue($params[0]->getName() == 'pDb');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
$this->assertTrue( $params[1]->getName() == 'pPort');
|
$this->assertTrue($params[1]->getName() == 'pPort');
|
||||||
$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() == '');
|
$this->assertTrue($params[1]->getDefaultValue() == '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::tryConnectServer
|
* @covers NET::tryConnectServer
|
||||||
* @todo Implement testtryConnectServer().
|
* @todo Implement testtryConnectServer().
|
||||||
*/
|
*/
|
||||||
public function testtryConnectServer()
|
public function testtryConnectServer()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'tryConnectServer');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pDbDriver');
|
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::tryOpenDataBase
|
* @covers NET::tryOpenDataBase
|
||||||
* @todo Implement testtryOpenDataBase().
|
* @todo Implement testtryOpenDataBase().
|
||||||
*/
|
*/
|
||||||
public function testtryOpenDataBase()
|
public function testtryOpenDataBase()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'tryOpenDataBase');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pDbDriver');
|
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::getDbServerVersion
|
* @covers NET::getDbServerVersion
|
||||||
* @todo Implement testgetDbServerVersion().
|
* @todo Implement testgetDbServerVersion().
|
||||||
*/
|
*/
|
||||||
public function testgetDbServerVersion()
|
public function testgetDbServerVersion()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'getDbServerVersion');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'driver');
|
$this->assertTrue($params[0]->getName() == 'driver');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::dbName
|
* @covers NET::dbName
|
||||||
* @todo Implement testdbName().
|
* @todo Implement testdbName().
|
||||||
*/
|
*/
|
||||||
public function testdbName()
|
public function testdbName()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'dbName');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'pAdapter');
|
$this->assertTrue($params[0]->getName() == 'pAdapter');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::showMsg
|
* @covers NET::showMsg
|
||||||
* @todo Implement testshowMsg().
|
* @todo Implement testshowMsg().
|
||||||
*/
|
*/
|
||||||
public function testshowMsg()
|
public function testshowMsg()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'showMsg');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::getErrno
|
* @covers NET::getErrno
|
||||||
* @todo Implement testgetErrno().
|
* @todo Implement testgetErrno().
|
||||||
*/
|
*/
|
||||||
public function testgetErrno()
|
public function testgetErrno()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('NET', 'getErrno');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers NET::getErrmsg
|
* @covers NET::getErrmsg
|
||||||
* @todo Implement testgetErrmsg().
|
* @todo Implement testgetErrmsg().
|
||||||
*/
|
*/
|
||||||
public function testgetErrmsg()
|
public function testgetErrmsg()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +61,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == true);
|
$this->assertTrue( $params[0]->isOptional () == true);
|
||||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::setColumns
|
* @covers PmTable::setColumns
|
||||||
@@ -75,7 +76,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'columns');
|
$this->assertTrue( $params[0]->getName() == 'columns');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::setDataSource
|
* @covers PmTable::setDataSource
|
||||||
@@ -90,7 +91,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'dbsUid');
|
$this->assertTrue( $params[0]->getName() == 'dbsUid');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::resolveDbSource
|
* @covers PmTable::resolveDbSource
|
||||||
@@ -105,7 +106,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'dbsUid');
|
$this->assertTrue( $params[0]->getName() == 'dbsUid');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::getDataSource
|
* @covers PmTable::getDataSource
|
||||||
@@ -117,7 +118,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('getDataSource', $methods ), 'exists method getDataSource' );
|
$this->assertTrue( in_array('getDataSource', $methods ), 'exists method getDataSource' );
|
||||||
$r = new ReflectionMethod('PmTable', 'getDataSource');
|
$r = new ReflectionMethod('PmTable', 'getDataSource');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::getDbConfig
|
* @covers PmTable::getDbConfig
|
||||||
@@ -129,7 +130,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('getDbConfig', $methods ), 'exists method getDbConfig' );
|
$this->assertTrue( in_array('getDbConfig', $methods ), 'exists method getDbConfig' );
|
||||||
$r = new ReflectionMethod('PmTable', 'getDbConfig');
|
$r = new ReflectionMethod('PmTable', 'getDbConfig');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::setAlterTable
|
* @covers PmTable::setAlterTable
|
||||||
@@ -144,7 +145,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'value');
|
$this->assertTrue( $params[0]->getName() == 'value');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::build
|
* @covers PmTable::build
|
||||||
@@ -156,7 +157,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('build', $methods ), 'exists method build' );
|
$this->assertTrue( in_array('build', $methods ), 'exists method build' );
|
||||||
$r = new ReflectionMethod('PmTable', 'build');
|
$r = new ReflectionMethod('PmTable', 'build');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::buildModelFor
|
* @covers PmTable::buildModelFor
|
||||||
@@ -174,7 +175,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 () == false);
|
$this->assertTrue( $params[1]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::prepare
|
* @covers PmTable::prepare
|
||||||
@@ -190,7 +191,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == true);
|
$this->assertTrue( $params[0]->isOptional () == true);
|
||||||
$this->assertTrue( $params[0]->getDefaultValue() == '1');
|
$this->assertTrue( $params[0]->getDefaultValue() == '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::loadSchema
|
* @covers PmTable::loadSchema
|
||||||
@@ -202,7 +203,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('loadSchema', $methods ), 'exists method loadSchema' );
|
$this->assertTrue( in_array('loadSchema', $methods ), 'exists method loadSchema' );
|
||||||
$r = new ReflectionMethod('PmTable', 'loadSchema');
|
$r = new ReflectionMethod('PmTable', 'loadSchema');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::buildSchema
|
* @covers PmTable::buildSchema
|
||||||
@@ -214,7 +215,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('buildSchema', $methods ), 'exists method buildSchema' );
|
$this->assertTrue( in_array('buildSchema', $methods ), 'exists method buildSchema' );
|
||||||
$r = new ReflectionMethod('PmTable', 'buildSchema');
|
$r = new ReflectionMethod('PmTable', 'buildSchema');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::remove
|
* @covers PmTable::remove
|
||||||
@@ -226,7 +227,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('remove', $methods ), 'exists method remove' );
|
$this->assertTrue( in_array('remove', $methods ), 'exists method remove' );
|
||||||
$r = new ReflectionMethod('PmTable', 'remove');
|
$r = new ReflectionMethod('PmTable', 'remove');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::removeFromSchema
|
* @covers PmTable::removeFromSchema
|
||||||
@@ -238,7 +239,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('removeFromSchema', $methods ), 'exists method removeFromSchema' );
|
$this->assertTrue( in_array('removeFromSchema', $methods ), 'exists method removeFromSchema' );
|
||||||
$r = new ReflectionMethod('PmTable', 'removeFromSchema');
|
$r = new ReflectionMethod('PmTable', 'removeFromSchema');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::removeModelFiles
|
* @covers PmTable::removeModelFiles
|
||||||
@@ -250,7 +251,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('removeModelFiles', $methods ), 'exists method removeModelFiles' );
|
$this->assertTrue( in_array('removeModelFiles', $methods ), 'exists method removeModelFiles' );
|
||||||
$r = new ReflectionMethod('PmTable', 'removeModelFiles');
|
$r = new ReflectionMethod('PmTable', 'removeModelFiles');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::dropTable
|
* @covers PmTable::dropTable
|
||||||
@@ -266,7 +267,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == true);
|
$this->assertTrue( $params[0]->isOptional () == true);
|
||||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::saveSchema
|
* @covers PmTable::saveSchema
|
||||||
@@ -278,7 +279,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('saveSchema', $methods ), 'exists method saveSchema' );
|
$this->assertTrue( in_array('saveSchema', $methods ), 'exists method saveSchema' );
|
||||||
$r = new ReflectionMethod('PmTable', 'saveSchema');
|
$r = new ReflectionMethod('PmTable', 'saveSchema');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::preparePropelIniFile
|
* @covers PmTable::preparePropelIniFile
|
||||||
@@ -290,7 +291,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('preparePropelIniFile', $methods ), 'exists method preparePropelIniFile' );
|
$this->assertTrue( in_array('preparePropelIniFile', $methods ), 'exists method preparePropelIniFile' );
|
||||||
$r = new ReflectionMethod('PmTable', 'preparePropelIniFile');
|
$r = new ReflectionMethod('PmTable', 'preparePropelIniFile');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::upgradeDatabase
|
* @covers PmTable::upgradeDatabase
|
||||||
@@ -302,7 +303,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('upgradeDatabase', $methods ), 'exists method upgradeDatabase' );
|
$this->assertTrue( in_array('upgradeDatabase', $methods ), 'exists method upgradeDatabase' );
|
||||||
$r = new ReflectionMethod('PmTable', 'upgradeDatabase');
|
$r = new ReflectionMethod('PmTable', 'upgradeDatabase');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::upgradeDatabaseFor
|
* @covers PmTable::upgradeDatabaseFor
|
||||||
@@ -320,8 +321,8 @@ 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::hasAutoIncrementPKey
|
* @covers PmTable::hasAutoIncrementPKey
|
||||||
@@ -333,7 +334,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('hasAutoIncrementPKey', $methods ), 'exists method hasAutoIncrementPKey' );
|
$this->assertTrue( in_array('hasAutoIncrementPKey', $methods ), 'exists method hasAutoIncrementPKey' );
|
||||||
$r = new ReflectionMethod('PmTable', 'hasAutoIncrementPKey');
|
$r = new ReflectionMethod('PmTable', 'hasAutoIncrementPKey');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::getPropelSupportedColumnTypes
|
* @covers PmTable::getPropelSupportedColumnTypes
|
||||||
@@ -342,10 +343,11 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::toCamelCase
|
* @covers PmTable::toCamelCase
|
||||||
@@ -360,7 +362,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'name');
|
$this->assertTrue( $params[0]->getName() == 'name');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::phingbuildModel
|
* @covers PmTable::phingbuildModel
|
||||||
@@ -372,7 +374,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('phingbuildModel', $methods ), 'exists method phingbuildModel' );
|
$this->assertTrue( in_array('phingbuildModel', $methods ), 'exists method phingbuildModel' );
|
||||||
$r = new ReflectionMethod('PmTable', 'phingbuildModel');
|
$r = new ReflectionMethod('PmTable', 'phingbuildModel');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::phingbuildSql
|
* @covers PmTable::phingbuildSql
|
||||||
@@ -384,7 +386,7 @@ class classPmTableTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('phingbuildSql', $methods ), 'exists method phingbuildSql' );
|
$this->assertTrue( in_array('phingbuildSql', $methods ), 'exists method phingbuildSql' );
|
||||||
$r = new ReflectionMethod('PmTable', 'phingbuildSql');
|
$r = new ReflectionMethod('PmTable', 'phingbuildSql');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers PmTable::callPhing
|
* @covers PmTable::callPhing
|
||||||
@@ -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';
|
||||||
@@ -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.
|
* 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
|
||||||
*/
|
*/
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the fixture, for example, opens a network connection.
|
* Sets up the fixture, for example, opens a network connection.
|
||||||
* This method is called before a test is executed.
|
* This method is called before a test is executed.
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
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.
|
* Tears down the fixture, for example, closes a network connection.
|
||||||
* This method is called after a test is executed.
|
* This method is called after a test is executed.
|
||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the default method to test, if the class still having
|
* This is the default method to test, if the class still having
|
||||||
* the same number of methods.
|
* the same number of methods.
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers caseSchedulerPlugin::__construct
|
* @covers caseSchedulerPlugin::__construct
|
||||||
* @todo Implement test__construct().
|
* @todo Implement test__construct().
|
||||||
*/
|
*/
|
||||||
public function test__construct()
|
public function test__construct()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$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');
|
$r = new ReflectionMethod('caseSchedulerPlugin', '__construct');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
$this->assertTrue($params[0]->getName() == 'sNamespace');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
$this->assertTrue( $params[1]->getName() == 'sActionId');
|
$this->assertTrue($params[1]->getName() == 'sActionId');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue($params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue($params[1]->isOptional() == false);
|
||||||
$this->assertTrue( $params[2]->getName() == 'sActionForm');
|
$this->assertTrue($params[2]->getName() == 'sActionForm');
|
||||||
$this->assertTrue( $params[2]->isArray() == false);
|
$this->assertTrue($params[2]->isArray() == false);
|
||||||
$this->assertTrue( $params[2]->isOptional () == false);
|
$this->assertTrue($params[2]->isOptional() == false);
|
||||||
$this->assertTrue( $params[3]->getName() == 'sActionSave');
|
$this->assertTrue($params[3]->getName() == 'sActionSave');
|
||||||
$this->assertTrue( $params[3]->isArray() == false);
|
$this->assertTrue($params[3]->isArray() == false);
|
||||||
$this->assertTrue( $params[3]->isOptional () == false);
|
$this->assertTrue($params[3]->isOptional() == false);
|
||||||
$this->assertTrue( $params[4]->getName() == 'sActionExecute');
|
$this->assertTrue($params[4]->getName() == 'sActionExecute');
|
||||||
$this->assertTrue( $params[4]->isArray() == false);
|
$this->assertTrue($params[4]->isArray() == false);
|
||||||
$this->assertTrue( $params[4]->isOptional () == false);
|
$this->assertTrue($params[4]->isOptional() == false);
|
||||||
$this->assertTrue( $params[5]->getName() == 'sActionGetFields');
|
$this->assertTrue($params[5]->getName() == 'sActionGetFields');
|
||||||
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,6 +81,6 @@ class classfolderDataTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[6]->isArray() == false);
|
$this->assertTrue( $params[6]->isArray() == false);
|
||||||
$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];
|
||||||
|
|
||||||
// create document
|
try {
|
||||||
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
// create document
|
||||||
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
||||||
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
||||||
$unassignedUsers, $unassignedGroups);
|
$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) {
|
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