public function testArchiveProjects_PublishedProject_ProjectArchived()
 {
     self::$environ->clean();
     $project = self::$environ->createProject(SF_TESTPROJECT, SF_TESTPROJECTCODE);
     $projectId = $project->id->asString();
     $ownerId = $project->ownerRef->asString();
     $this->assertFalse($project->isArchived);
     ProjectCommands::archiveProject($projectId, $ownerId);
     $project->read($projectId);
     $this->assertTrue($project->isArchived);
 }
Ejemplo n.º 2
0
 /**
  * Clear out the session projectId and archive project
  *
  * @return string
  */
 public function project_archive()
 {
     $this->app['session']->set('projectId', "");
     return ProjectCommands::archiveProject($this->projectId, $this->userId);
 }