public function itAlwaysReturnsWikiAndProjectAdminGroups()
 {
     stub($this->permission_manager)->getAuthorizedUgroupIds(101, 'WIKIPAGE_READ')->returns(array('107'));
     stub($this->permission_manager)->getAuthorizedUgroupIds(200, 'WIKI_READ')->returns(array('3'));
     stub($this->project)->isPublic()->returns(true);
     $expected = array('@ug_107', '@perceval_project_admin', '@perceval_wiki_admin');
     $this->assertEqual($expected, $this->wiki_permissions_manager->getFromattedUgroupsThatCanReadWikiPage($this->wiki_page));
 }
 private function reindexForWikiServiceUsingUgroup($ugroup_id, $project_id)
 {
     $wiki_perm_manager = new Wiki_PermissionsManager(PermissionsManager::instance(), ProjectManager::instance(), new UGroupLiteralizer());
     if ($wiki_perm_manager->isUgroupUsed($ugroup_id, $project_id)) {
         $this->getWikiSystemEventManager()->queueWikiProjectReindexation($project_id);
     }
 }
 public function getCurrentPermissions(WikiPage $wiki_page)
 {
     return $this->permissions_manager->getFromattedUgroupsThatCanReadWikiPage($wiki_page);
 }