/**
  * @expectedException Exception
  */
 public function testFetchFromAPIInvalidReply()
 {
     $mock = $this->mockPhabricatorAPIWithReply(new \stdClass());
     ProjectsMap::fetch("http://phabricator.acme.tld", $mock);
 }
 /**
  * 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);
     }
 }
 public function testThatArrayContainsExpectedData()
 {
     $this->assertSame([["PHID-PROJ-6dg6ogx5pjmk24ur4tp4", "Accounts"], ["PHID-PROJ-cztcgpvqr6smnnekotq7", "Agora"], ["PHID-PROJ-3iew3cqf3htpazfyzb5a", "architecture"]], $this->map->toArray());
 }