public function testGetOnlineIdentities()
 {
     $lUserHugo = UserTable::getByIdentifier('hugo');
     $lIdentities = UserIdentityConTable::getOnlineIdentitiesForUser($lUserHugo->getId());
     $this->assertEquals(2, count($lIdentities));
     $this->assertTrue(is_array($lIdentities));
 }
Пример #2
0
 public function testUpdateOwnedIdentities()
 {
     parent::resetMongo();
     Doctrine::loadData(dirname(__FILE__) . '/fixtures');
     $lUserHugo = UserTable::getByIdentifier('hugo');
     $lUserHugo->updateOwnedIdentities(array("1", "2", "34"));
     $lRelation = $lUserHugo->retrieveUserRelations();
     $this->assertTrue(in_array("34", $lRelation->getOwnedOi()));
 }
Пример #3
0
 public function testGetUsersAuthTokensWithPubblishing()
 {
     $lUserHugo = UserTable::getByIdentifier('hugo');
     $lTokens = UserTable::getTokensForPublishingByUserId($lUserHugo->getId());
     $this->assertEquals(1, count($lTokens));
 }