public function testUserTypeahead_CrossSiteNoMatchingEntries() { $e = new MongoTestEnvironment(); $e->clean(); $userId = $e->createUser('someuser', 'Some User', '*****@*****.**'); $someUser = new UserModel($userId); // Check no users exist on another website $website = new Website('languageforge.local', Website::LANGUAGEFORGE); $model = new Api\Model\UserTypeaheadModel('some', '', $website); $model->read(); $this->assertEqual(0, $model->count); $this->assertEqual(array(), $model->entries); }
/** * * @param string $term * @param string $projectIdToExclude * @param Website website * @return \Api\Model\UserTypeaheadModel */ public static function userTypeaheadList($term, $projectIdToExclude = '', $website) { $list = new \Api\Model\UserTypeaheadModel($term, $projectIdToExclude, $website); $list->read(); return $list; }