public function itDoesNotCallTheAfterMethodOnWorkflowWhenSaveOfArtifactFails()
 {
     stub($this->changeset_dao)->create()->returns(true);
     stub($this->artifact_factory)->save()->returns(false);
     expect($this->workflow)->after()->never();
     $this->creator->create($this->artifact, $this->fields_data, $this->submitter, $this->submitted_on);
 }
 /**
  * Create the initial changeset of this artifact
  *
  * @param array   $fields_data The artifact fields values
  * @param PFUser  $submitter   The user who did the artifact submission
  * @param integer $submitted_on When the changeset is created
  *
  * @return int The Id of the initial changeset, or null if fields were not valid
  */
 public function createInitialChangeset($fields_data, $submitter, $submitted_on)
 {
     $creator = new Tracker_Artifact_Changeset_InitialChangesetCreator(new Tracker_Artifact_Changeset_InitialChangesetFieldsValidator($this->getFormElementFactory()), $this->getFormElementFactory(), $this->getChangesetDao(), $this->getArtifactFactory(), $this->getEventManager());
     return $creator->create($this, $fields_data, $submitter, $submitted_on);
 }