1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Route lipsum writes through the new Maniphest transaction code

Summary: Ref T2217. Ship these through the new stuff.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7087
This commit is contained in:
epriestley 2013-09-23 14:33:00 -07:00
parent 11c7eee783
commit 2a78767a4a

View file

@ -10,13 +10,14 @@ final class PhabricatorManiphestTaskTestDataGenerator
$task = id(new ManiphestTask()) $task = id(new ManiphestTask())
->setSubPriority($this->generateTaskSubPriority()) ->setSubPriority($this->generateTaskSubPriority())
->setAuthorPHID($authorPHID) ->setAuthorPHID($authorPHID)
->setTitle($this->generateTitle()); ->setTitle($this->generateTitle())
->setStatus(ManiphestTaskStatus::STATUS_OPEN);
$content_source = PhabricatorContentSource::newForSource( $content_source = PhabricatorContentSource::newForSource(
PhabricatorContentSource::SOURCE_UNKNOWN, PhabricatorContentSource::SOURCE_UNKNOWN,
array()); array());
$template = id(new ManiphestTransaction())
->setAuthorPHID($authorPHID) $template = new ManiphestTransactionPro();
->setContentSource($content_source);
// Accumulate Transactions // Accumulate Transactions
$changes = array(); $changes = array();
$changes[ManiphestTransactionType::TYPE_TITLE] = $changes[ManiphestTransactionType::TYPE_TITLE] =
@ -42,8 +43,11 @@ final class PhabricatorManiphestTaskTestDataGenerator
} }
// Apply Transactions // Apply Transactions
$editor = id(new ManiphestTransactionEditor()) $editor = id(new ManiphestTransactionEditorPro())
->setActor($author) ->setActor($author)
->setContentSource($content_source)
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->applyTransactions($task, $transactions); ->applyTransactions($task, $transactions);
return $task->save(); return $task->save();
} }