2013-04-12 23:07:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorLipsumGenerateWorkflow
|
|
|
|
extends PhabricatorLipsumManagementWorkflow {
|
|
|
|
|
|
|
|
protected function didConstruct() {
|
|
|
|
$this
|
|
|
|
->setName('generate')
|
|
|
|
->setExamples('**generate**')
|
2013-04-15 04:09:20 +02:00
|
|
|
->setSynopsis('Generate some lipsum.')
|
2013-04-12 23:07:15 +02:00
|
|
|
->setArguments(
|
|
|
|
array(
|
|
|
|
array(
|
|
|
|
'name' => 'args',
|
|
|
|
'wildcard' => true,
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
2013-04-15 04:09:20 +02:00
|
|
|
$admin = PhabricatorUser::getOmnipotentUser();
|
2013-04-25 03:17:30 +02:00
|
|
|
// $peoplegen = new PhabricatorPeopleTestDataGenerator();
|
|
|
|
// $object = $peoplegen->generate();
|
|
|
|
// $handle = PhabricatorObjectHandleData::loadOneHandle($object->getPHID(),
|
|
|
|
// $admin);
|
|
|
|
// echo "Generated ".$handle->getFullName()."\n";
|
|
|
|
|
|
|
|
$taskgen = new PhabricatorManiphestTaskTestDataGenerator();
|
|
|
|
$object = $taskgen->generate();
|
2013-04-15 04:09:20 +02:00
|
|
|
$handle = PhabricatorObjectHandleData::loadOneHandle($object->getPHID(),
|
|
|
|
$admin);
|
|
|
|
echo "Generated ".$handle->getFullName()."\n";
|
|
|
|
echo "\nRequested data has been generated.";
|
2013-04-25 03:17:30 +02:00
|
|
|
|
|
|
|
// $taskgen = new PhabricatorRevisionTestDataGenerator();
|
|
|
|
// $object = $taskgen->generate();
|
|
|
|
// $handle = PhabricatorObjectHandleData::loadOneHandle($object->getPHID(),
|
|
|
|
// $admin);
|
|
|
|
// echo "Generated ".$handle->getFullName()."\n";
|
|
|
|
// echo "\nRequested data has been generated.";
|
2013-04-12 23:07:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|