php units for all classes
This commit is contained in:
@@ -1,219 +1,356 @@
|
||||
<?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/thirdparty/propel/Propel.php' ;
|
||||
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php' ;
|
||||
require_once PATH_TRUNK . 'workflow/engine/classes/class.groups.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.groups.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-05-10 at 20:56:12.
|
||||
*/
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:32.
|
||||
*/
|
||||
|
||||
class classGroupsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Groups
|
||||
*/
|
||||
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 Groups();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
$this->assertTrue( count($methods) == 17);
|
||||
}
|
||||
|
||||
class classGroupsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Groups::getUsersOfGroup
|
||||
* @todo Implement testgetUsersOfGroup().
|
||||
*/
|
||||
public function testgetUsersOfGroup()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getUsersOfGroup', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetUsersOfGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUsersOfGroup', $methods ), 'exists method getUsersOfGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'getUsersOfGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getActiveGroupsForAnUser
|
||||
* @todo Implement testgetActiveGroupsForAnUser().
|
||||
*/
|
||||
public function testgetActiveGroupsForAnUser()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getActiveGroupsForAnUser', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetActiveGroupsForAnUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getActiveGroupsForAnUser', $methods ), 'exists method getActiveGroupsForAnUser' );
|
||||
$r = new ReflectionMethod('Groups', 'getActiveGroupsForAnUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::addUserToGroup
|
||||
* @todo Implement testaddUserToGroup().
|
||||
*/
|
||||
public function testaddUserToGroup()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'addUserToGroup', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testaddUserToGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addUserToGroup', $methods ), 'exists method addUserToGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'addUserToGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::removeUserOfGroup
|
||||
* @todo Implement testremoveUserOfGroup().
|
||||
*/
|
||||
public function testremoveUserOfGroup()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'removeUserOfGroup', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testremoveUserOfGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeUserOfGroup', $methods ), 'exists method removeUserOfGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'removeUserOfGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAllGroups
|
||||
* @todo Implement testgetAllGroups().
|
||||
*/
|
||||
public function testgetAllGroups()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getAllGroups', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetAllGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllGroups', $methods ), 'exists method getAllGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getAllGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUserGroups
|
||||
* @todo Implement testgetUserGroups().
|
||||
*/
|
||||
public function testgetUserGroups()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getUserGroups', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetUserGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserGroups', $methods ), 'exists method getUserGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getUserGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAvailableGroupsCriteria
|
||||
* @todo Implement testgetAvailableGroupsCriteria().
|
||||
*/
|
||||
public function testgetAvailableGroupsCriteria()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getAvailableGroupsCriteria', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetAvailableGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAvailableGroupsCriteria', $methods ), 'exists method getAvailableGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAvailableGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAssignedGroupsCriteria
|
||||
* @todo Implement testgetAssignedGroupsCriteria().
|
||||
*/
|
||||
public function testgetAssignedGroupsCriteria()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getAssignedGroupsCriteria', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetAssignedGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAssignedGroupsCriteria', $methods ), 'exists method getAssignedGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAssignedGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getGroupsForUser
|
||||
* @todo Implement testgetGroupsForUser().
|
||||
*/
|
||||
public function testgetGroupsForUser()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getGroupsForUser', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetGroupsForUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getGroupsForUser', $methods ), 'exists method getGroupsForUser' );
|
||||
$r = new ReflectionMethod('Groups', 'getGroupsForUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'usrUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::removeUserOfAllGroups
|
||||
* @todo Implement testremoveUserOfAllGroups().
|
||||
*/
|
||||
public function testremoveUserOfAllGroups()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'removeUserOfAllGroups', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testremoveUserOfAllGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeUserOfAllGroups', $methods ), 'exists method removeUserOfAllGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'removeUserOfAllGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUsersGroupCriteria
|
||||
* @todo Implement testgetUsersGroupCriteria().
|
||||
*/
|
||||
public function testgetUsersGroupCriteria()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getUsersGroupCriteria', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetUsersGroupCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUsersGroupCriteria', $methods ), 'exists method getUsersGroupCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getUsersGroupCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUserGroupsCriteria
|
||||
* @todo Implement testgetUserGroupsCriteria().
|
||||
*/
|
||||
public function testgetUserGroupsCriteria()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getUserGroupsCriteria', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetUserGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserGroupsCriteria', $methods ), 'exists method getUserGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getUserGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getNumberGroups
|
||||
* @todo Implement testgetNumberGroups().
|
||||
*/
|
||||
public function testgetNumberGroups()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getNumberGroups', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetNumberGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNumberGroups', $methods ), 'exists method getNumberGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getNumberGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAvailableUsersCriteria
|
||||
* @todo Implement testgetAvailableUsersCriteria().
|
||||
*/
|
||||
public function testgetAvailableUsersCriteria()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'getAvailableUsersCriteria', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetAvailableUsersCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAvailableUsersCriteria', $methods ), 'exists method getAvailableUsersCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAvailableUsersCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::verifyUsertoGroup
|
||||
* @todo Implement testverifyUsertoGroup().
|
||||
*/
|
||||
public function testverifyUsertoGroup()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'verifyUsertoGroup', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testverifyUsertoGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyUsertoGroup', $methods ), 'exists method verifyUsertoGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'verifyUsertoGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::verifyGroup
|
||||
* @todo Implement testverifyGroup().
|
||||
*/
|
||||
public function testverifyGroup()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'verifyGroup', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testverifyGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyGroup', $methods ), 'exists method verifyGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'verifyGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
if (class_exists('Groups')) {
|
||||
$methods = get_class_methods( 'Groups');
|
||||
$this->assertTrue( in_array( 'load', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('Groups', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user