Пример #1
0
 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);
 }
Пример #2
0
 /**
  *
  * @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;
 }