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() { $methods = get_class_methods('Groups'); $this->assertTrue( count($methods) == 17); } /** * @covers Groups::getUsersOfGroup * @todo Implement testgetUsersOfGroup(). */ 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); } /** * @covers Groups::getActiveGroupsForAnUser * @todo Implement testgetActiveGroupsForAnUser(). */ 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); } /** * @covers Groups::addUserToGroup * @todo Implement testaddUserToGroup(). */ 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); } /** * @covers Groups::removeUserOfGroup * @todo Implement testremoveUserOfGroup(). */ 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); } /** * @covers Groups::getAllGroups * @todo Implement testgetAllGroups(). */ 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(); } /** * @covers Groups::getUserGroups * @todo Implement testgetUserGroups(). */ 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); } /** * @covers Groups::getAvailableGroupsCriteria * @todo Implement testgetAvailableGroupsCriteria(). */ 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() == ''); } /** * @covers Groups::getAssignedGroupsCriteria * @todo Implement testgetAssignedGroupsCriteria(). */ 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() == ''); } /** * @covers Groups::getGroupsForUser * @todo Implement testgetGroupsForUser(). */ 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); } /** * @covers Groups::removeUserOfAllGroups * @todo Implement testremoveUserOfAllGroups(). */ 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() == ''); } /** * @covers Groups::getUsersGroupCriteria * @todo Implement testgetUsersGroupCriteria(). */ 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() == ''); } /** * @covers Groups::getUserGroupsCriteria * @todo Implement testgetUserGroupsCriteria(). */ 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() == ''); } /** * @covers Groups::getNumberGroups * @todo Implement testgetNumberGroups(). */ 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); } /** * @covers Groups::getAvailableUsersCriteria * @todo Implement testgetAvailableUsersCriteria(). */ 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() == ''); } /** * @covers Groups::verifyUsertoGroup * @todo Implement testverifyUsertoGroup(). */ 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); } /** * @covers Groups::verifyGroup * @todo Implement testverifyGroup(). */ 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); } /** * @covers Groups::load * @todo Implement testload(). */ 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); } }