Ejemplo n.º 1
0
 public function testGetGroups()
 {
     $restService = new camundaRestClient(self::$restApi);
     $groupRequest = array('name' => 'testgroup', 'id' => 'sales', 'type' => 'Organizational Unit');
     $restService->createSingleGroup($groupRequest);
     $this->assertEquals('sales', $restService->getGroups()[0]->id);
     $groupRequest = array('name' => 'testgroup2', 'id' => 'sales2', 'type' => 'Organizational Unit');
     $restService->createSingleGroup($groupRequest);
     $this->assertEquals('sales2', $restService->getGroups()[1]->id);
     $filteredGroup = array('name' => 'testgroup');
     $this->assertEquals('sales', $restService->getGroups($filteredGroup)[0]->id);
     $this->assertArrayNotHasKey('1', $restService->getGroups($filteredGroup));
     $restService->deleteSingleGroup('sales');
     $restService->deleteSingleGroup('sales2');
 }