user = SugarTestUserUtilities::createAnonymousUser(); $this->user2 = SugarTestUserUtilities::createAnonymousUser(); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($this->user); unset($this->user2); } public function testGetUserArray() { $users1 = get_user_array(false, ''); $users2 = get_user_array(false, '', '', true, "{$this->user->user_name}"); $users3 = get_user_array(false, '', '', true, "{$this->user2->user_name}"); $this->assertNotEquals(count($users1), count($users2), 'get_user_array does not filter correctly on cache'); $this->assertEquals(1, count($users2), 'get_user_array does not filter correctly on cache'); $this->assertEquals(1, count($users3), 'get_user_array does not filter correctly on cache'); } }