예제 #1
0
 /**
  * Queries the list of the projects associated to the story
  * and attached it to the projects property.
  */
 public function attachProjects()
 {
     $this->projects = [];
     $PHIDs = $this->getProjectsPHIDs();
     if (count($PHIDs) == 0) {
         // No project is attached to the story's object
         return;
     }
     $map = ProjectsMap::load($this->instanceName);
     foreach ($PHIDs as $PHID) {
         $this->projects[] = $map->getProjectName($PHID);
     }
 }
예제 #2
0
 public function testLoadWhenInCache()
 {
     $this->map->saveToCache();
     $map = ProjectsMap::load("http://phabricator.acme.tld");
     $this->assertTrue($map->offsetExists("PHID-PROJ-cztcgpvqr6smnnekotq7"));
 }