719 lines
30 KiB
PHP
719 lines
30 KiB
PHP
<?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';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
|
|
require_once PATH_TRUNK . 'workflow/engine/classes/class.wsBase.php';
|
|
|
|
/**
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
|
*/
|
|
|
|
class classwsBaseTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @var wsBase
|
|
*/
|
|
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 wsBase();
|
|
}
|
|
|
|
/**
|
|
* 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('wsBase');
|
|
$this->assertTrue( count($methods) == 41, count($methods));
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::__construct
|
|
* @todo Implement test__construct().
|
|
*/
|
|
public function test__construct()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
|
$r = new ReflectionMethod('wsBase', '__construct');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'params');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::login
|
|
* @todo Implement testlogin().
|
|
*/
|
|
public function testlogin()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('login', $methods ), 'exists method login' );
|
|
$r = new ReflectionMethod('wsBase', 'login');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userid');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'password');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::processList
|
|
* @todo Implement testprocessList().
|
|
*/
|
|
public function testprocessList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('processList', $methods ), 'exists method processList' );
|
|
$r = new ReflectionMethod('wsBase', 'processList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::roleList
|
|
* @todo Implement testroleList().
|
|
*/
|
|
public function testroleList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('roleList', $methods ), 'exists method roleList' );
|
|
$r = new ReflectionMethod('wsBase', 'roleList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::groupList
|
|
* @todo Implement testgroupList().
|
|
*/
|
|
public function testgroupList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('groupList', $methods ), 'exists method groupList' );
|
|
$r = new ReflectionMethod('wsBase', 'groupList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::departmentList
|
|
* @todo Implement testdepartmentList().
|
|
*/
|
|
public function testdepartmentList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('departmentList', $methods ), 'exists method departmentList' );
|
|
$r = new ReflectionMethod('wsBase', 'departmentList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::caseList
|
|
* @todo Implement testcaseList().
|
|
*/
|
|
public function testcaseList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('caseList', $methods ), 'exists method caseList' );
|
|
$r = new ReflectionMethod('wsBase', 'caseList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::unassignedCaseList
|
|
* @todo Implement testunassignedCaseList().
|
|
*/
|
|
public function testunassignedCaseList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('unassignedCaseList', $methods ), 'exists method unassignedCaseList' );
|
|
$r = new ReflectionMethod('wsBase', 'unassignedCaseList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::userList
|
|
* @todo Implement testuserList().
|
|
*/
|
|
public function testuserList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('userList', $methods ), 'exists method userList' );
|
|
$r = new ReflectionMethod('wsBase', 'userList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::triggerList
|
|
* @todo Implement testtriggerList().
|
|
*/
|
|
public function testtriggerList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('triggerList', $methods ), 'exists method triggerList' );
|
|
$r = new ReflectionMethod('wsBase', 'triggerList');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::inputDocumentList
|
|
* @todo Implement testinputDocumentList().
|
|
*/
|
|
public function testinputDocumentList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('inputDocumentList', $methods ), 'exists method inputDocumentList' );
|
|
$r = new ReflectionMethod('wsBase', 'inputDocumentList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'sApplicationUID');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'sUserUID');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::inputDocumentProcessList
|
|
* @todo Implement testinputDocumentProcessList().
|
|
*/
|
|
public function testinputDocumentProcessList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('inputDocumentProcessList', $methods ), 'exists method inputDocumentProcessList' );
|
|
$r = new ReflectionMethod('wsBase', 'inputDocumentProcessList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'sProcessUID');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::outputDocumentList
|
|
* @todo Implement testoutputDocumentList().
|
|
*/
|
|
public function testoutputDocumentList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('outputDocumentList', $methods ), 'exists method outputDocumentList' );
|
|
$r = new ReflectionMethod('wsBase', 'outputDocumentList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'sApplicationUID');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'sUserUID');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::removeDocument
|
|
* @todo Implement testremoveDocument().
|
|
*/
|
|
public function testremoveDocument()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('removeDocument', $methods ), 'exists method removeDocument' );
|
|
$r = new ReflectionMethod('wsBase', 'removeDocument');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'appDocUid');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::taskList
|
|
* @todo Implement testtaskList().
|
|
*/
|
|
public function testtaskList()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('taskList', $methods ), 'exists method taskList' );
|
|
$r = new ReflectionMethod('wsBase', 'taskList');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::sendMessage
|
|
* @todo Implement testsendMessage().
|
|
*/
|
|
public function testsendMessage()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('sendMessage', $methods ), 'exists method sendMessage' );
|
|
$r = new ReflectionMethod('wsBase', 'sendMessage');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'sFrom');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'sTo');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'sCc');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
$this->assertTrue( $params[4]->getName() == 'sBcc');
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
$this->assertTrue( $params[4]->isOptional () == false);
|
|
$this->assertTrue( $params[5]->getName() == 'sSubject');
|
|
$this->assertTrue( $params[5]->isArray() == false);
|
|
$this->assertTrue( $params[5]->isOptional () == false);
|
|
$this->assertTrue( $params[6]->getName() == 'sTemplate');
|
|
$this->assertTrue( $params[6]->isArray() == false);
|
|
$this->assertTrue( $params[6]->isOptional () == false);
|
|
$this->assertTrue( $params[7]->getName() == 'appFields');
|
|
$this->assertTrue( $params[7]->isArray() == false);
|
|
$this->assertTrue( $params[7]->isOptional () == true);
|
|
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[8]->getName() == 'aAttachment');
|
|
$this->assertTrue( $params[8]->isArray() == false);
|
|
$this->assertTrue( $params[8]->isOptional () == true);
|
|
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::getCaseInfo
|
|
* @todo Implement testgetCaseInfo().
|
|
*/
|
|
public function testgetCaseInfo()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getCaseInfo', $methods ), 'exists method getCaseInfo' );
|
|
$r = new ReflectionMethod('wsBase', 'getCaseInfo');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'iDelIndex');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::createUser
|
|
* @todo Implement testcreateUser().
|
|
*/
|
|
public function testcreateUser()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('createUser', $methods ), 'exists method createUser' );
|
|
$r = new ReflectionMethod('wsBase', 'createUser');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userName');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'firstName');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'lastName');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'email');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
$this->assertTrue( $params[4]->getName() == 'role');
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
$this->assertTrue( $params[4]->isOptional () == false);
|
|
$this->assertTrue( $params[5]->getName() == 'password');
|
|
$this->assertTrue( $params[5]->isArray() == false);
|
|
$this->assertTrue( $params[5]->isOptional () == false);
|
|
$this->assertTrue( $params[6]->getName() == 'dueDate');
|
|
$this->assertTrue( $params[6]->isArray() == false);
|
|
$this->assertTrue( $params[6]->isOptional () == true);
|
|
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[7]->getName() == 'status');
|
|
$this->assertTrue( $params[7]->isArray() == false);
|
|
$this->assertTrue( $params[7]->isOptional () == true);
|
|
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::createGroup
|
|
* @todo Implement testcreateGroup().
|
|
*/
|
|
public function testcreateGroup()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('createGroup', $methods ), 'exists method createGroup' );
|
|
$r = new ReflectionMethod('wsBase', 'createGroup');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'groupName');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::createDepartment
|
|
* @todo Implement testcreateDepartment().
|
|
*/
|
|
public function testcreateDepartment()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('createDepartment', $methods ), 'exists method createDepartment' );
|
|
$r = new ReflectionMethod('wsBase', 'createDepartment');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'departmentName');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'parentUID');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::removeUserFromGroup
|
|
* @todo Implement testremoveUserFromGroup().
|
|
*/
|
|
public function testremoveUserFromGroup()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('removeUserFromGroup', $methods ), 'exists method removeUserFromGroup' );
|
|
$r = new ReflectionMethod('wsBase', 'removeUserFromGroup');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'groupId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::assignUserToGroup
|
|
* @todo Implement testassignUserToGroup().
|
|
*/
|
|
public function testassignUserToGroup()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('assignUserToGroup', $methods ), 'exists method assignUserToGroup' );
|
|
$r = new ReflectionMethod('wsBase', 'assignUserToGroup');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'groupId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::assignUserToDepartment
|
|
* @todo Implement testassignUserToDepartment().
|
|
*/
|
|
public function testassignUserToDepartment()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('assignUserToDepartment', $methods ), 'exists method assignUserToDepartment' );
|
|
$r = new ReflectionMethod('wsBase', 'assignUserToDepartment');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'depId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'manager');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::sendVariables
|
|
* @todo Implement testsendVariables().
|
|
*/
|
|
public function testsendVariables()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('sendVariables', $methods ), 'exists method sendVariables' );
|
|
$r = new ReflectionMethod('wsBase', 'sendVariables');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'variables');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::getVariables
|
|
* @todo Implement testgetVariables().
|
|
*/
|
|
public function testgetVariables()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getVariables', $methods ), 'exists method getVariables' );
|
|
$r = new ReflectionMethod('wsBase', 'getVariables');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'variables');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::getVariablesNames
|
|
* @todo Implement testgetVariablesNames().
|
|
*/
|
|
public function testgetVariablesNames()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getVariablesNames', $methods ), 'exists method getVariablesNames' );
|
|
$r = new ReflectionMethod('wsBase', 'getVariablesNames');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::newCase
|
|
* @todo Implement testnewCase().
|
|
*/
|
|
public function testnewCase()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('newCase', $methods ), 'exists method newCase' );
|
|
$r = new ReflectionMethod('wsBase', 'newCase');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'processId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'userId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'taskId');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'variables');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::newCaseImpersonate
|
|
* @todo Implement testnewCaseImpersonate().
|
|
*/
|
|
public function testnewCaseImpersonate()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('newCaseImpersonate', $methods ), 'exists method newCaseImpersonate' );
|
|
$r = new ReflectionMethod('wsBase', 'newCaseImpersonate');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'processId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'userId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'variables');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::derivateCase
|
|
* @todo Implement testderivateCase().
|
|
*/
|
|
public function testderivateCase()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('derivateCase', $methods ), 'exists method derivateCase' );
|
|
$r = new ReflectionMethod('wsBase', 'derivateCase');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'caseId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'delIndex');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'bExecuteTriggersBeforeAssignment');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::executeTrigger
|
|
* @todo Implement testexecuteTrigger().
|
|
*/
|
|
public function testexecuteTrigger()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('executeTrigger', $methods ), 'exists method executeTrigger' );
|
|
$r = new ReflectionMethod('wsBase', 'executeTrigger');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'caseId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'triggerIndex');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'delIndex');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::taskCase
|
|
* @todo Implement testtaskCase().
|
|
*/
|
|
public function testtaskCase()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('taskCase', $methods ), 'exists method taskCase' );
|
|
$r = new ReflectionMethod('wsBase', 'taskCase');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'caseId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::processListVerified
|
|
* @todo Implement testprocessListVerified().
|
|
*/
|
|
public function testprocessListVerified()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('processListVerified', $methods ), 'exists method processListVerified' );
|
|
$r = new ReflectionMethod('wsBase', 'processListVerified');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'userId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::reassignCase
|
|
* @todo Implement testreassignCase().
|
|
*/
|
|
public function testreassignCase()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('reassignCase', $methods ), 'exists method reassignCase' );
|
|
$r = new ReflectionMethod('wsBase', 'reassignCase');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'sessionId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'caseId');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
$this->assertTrue( $params[2]->getName() == 'delIndex');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
$this->assertTrue( $params[3]->getName() == 'userIdSource');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
$this->assertTrue( $params[4]->getName() == 'userIdTarget');
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
$this->assertTrue( $params[4]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::systemInformation
|
|
* @todo Implement testsystemInformation().
|
|
*/
|
|
public function testsystemInformation()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('systemInformation', $methods ), 'exists method systemInformation' );
|
|
$r = new ReflectionMethod('wsBase', 'systemInformation');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::importProcessFromLibrary
|
|
* @todo Implement testimportProcessFromLibrary().
|
|
*/
|
|
public function testimportProcessFromLibrary()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('importProcessFromLibrary', $methods ), 'exists method importProcessFromLibrary' );
|
|
$r = new ReflectionMethod('wsBase', 'importProcessFromLibrary');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'processId');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'version');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[2]->getName() == 'importOption');
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[3]->getName() == 'usernameLibrary');
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[4]->getName() == 'passwordLibrary');
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers wsBase::getCaseNotes
|
|
* @todo Implement testgetCaseNotes().
|
|
*/
|
|
public function testgetCaseNotes()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getCaseNotes', $methods ), 'exists method getCaseNotes' );
|
|
$r = new ReflectionMethod('wsBase', 'getCaseNotes');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'applicationID');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'userUid');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
}
|
|
|
|
}
|