Пример #1
0
 public function testRemoveGroupMember()
 {
     $restService = new camundaRestClient(self::$restApi);
     $user = array();
     $profile = array();
     $credentials = array();
     $profile['id'] = 'shentschel';
     $profile['firstName'] = 'Stefan';
     $profile['lastName'] = 'Hentschel';
     $profile['email'] = '*****@*****.**';
     $credentials['password'] = '******';
     $user['profile'] = $profile;
     $user['credentials'] = $credentials;
     $restService->createSingleUser($user);
     $groupRequest = array('name' => 'testgroup', 'id' => 'sales', 'type' => 'Organizational Unit');
     $restService->createSingleGroup($groupRequest);
     $groupRequest = array('name' => 'testgroup2', 'id' => 'sales2', 'type' => 'Organizational Unit');
     $restService->createSingleGroup($groupRequest);
     $restService->addGroupMember('sales', 'shentschel');
     $filteredGroup = array('member' => 'shentschel');
     $this->assertEquals(1, $restService->getGroupsCount($filteredGroup)->count);
     $restService->removeGroupMember('sales', 'shentschel');
     $this->assertEquals(0, $restService->getGroupsCount($filteredGroup)->count);
     $restService->deleteSingleGroup('sales');
     $restService->deleteSingleGroup('sales2');
     $restService->deleteSingleUser('shentschel');
 }