Example #1
0
 function testSiteWorkflowCreate()
 {
     $site = SiteFactory::instance('phpunittest');
     $workflow = SiteWorkflow::createWorkflow('update_site_organization_membership', $site);
     $this->assertInstanceOf('Terminus\\SiteWorkflow', $workflow);
     $this->assertInstanceOf('Terminus\\Site', $workflow->site);
     $this->assertNull($workflow->status());
     $workflow->start();
 }
Example #2
0
 /**
  * Remove membshipship, either org or user
  *
  * @param $type string identifiying type of membership ... i.e. organization or user
  * @param $uuid string identifying the machine name of organization/user
  *
  * @return Workflow object
  **/
 public function removeMembership($type, $uuid)
 {
     $type = sprintf('remove_site_%s_membership', $type);
     $workflow = new SiteWorkflow($type, $this);
     $workflow->setParams(array('params' => array('organization_id' => $uuid)));
     $workflow->start('POST');
     return $workflow;
 }