/** * @test */ public function getUsers() { $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); $this->assertEquals('shentschel', $restService->getUsers()[0]->id); unset($user); unset($profile); unset($credentials); $user = array(); $profile = array(); $credentials = array(); $profile['id'] = 'jonny1'; $profile['firstName'] = 'John'; $profile['lastName'] = 'Doe'; $profile['email'] = '*****@*****.**'; $credentials['password'] = '******'; $user['profile'] = $profile; $user['credentials'] = $credentials; $restService->createSingleUser($user); $this->assertEquals('jonny1', $restService->getUsers()[0]->id); $this->assertEquals('shentschel', $restService->getUsers()[1]->id); $filteredUser = array('firstName' => 'Stefan'); $this->assertEquals('shentschel', $restService->getUsers($filteredUser)[0]->id); $this->assertArrayNotHasKey('1', $restService->getUsers($filteredUser)); $restService->deleteSingleUser('shentschel'); $restService->deleteSingleUser('jonny1'); }