public function testPublishProjects_ArchivedProject_ProjectPublished()
 {
     $this->environ->clean();
     $project = $this->environ->createProject(SF_TESTPROJECT, SF_TESTPROJECTCODE);
     $project->isArchived = true;
     $projectId = $project->write();
     $this->assertTrue($project->isArchived);
     $count = ProjectCommands::publishProjects(array($projectId));
     $project->read($projectId);
     $this->assertEqual($count, 1);
     $this->assertFalse($project->isArchived);
 }
Beispiel #2
0
 /**
  * Publish projects
  *
  * @param array<string> $projectIds
  * @return int Count of published projects
  */
 public function project_publish($projectIds)
 {
     return ProjectCommands::publishProjects($projectIds);
 }