/** * @test */ public function getUserCount() { $restService = new camundaRestClient(self::$restApi); $filteredUser = array('firstName' => 'Stefan'); $precount = $restService->getUserCount()->count; $filteredPrecount = $restService->getUserCount($filteredUser)->count; $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($precount + 1, $restService->getUserCount()->count); 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($precount + 2, $restService->getUserCount()->count); $this->assertEquals($filteredPrecount + 1, $restService->getUserCount($filteredUser)->count); $restService->deleteSingleUser('shentschel'); $restService->deleteSingleUser('jonny1'); $this->assertEquals($precount, $restService->getUserCount()->count); }