mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
First Diff of Test Data Generator
Summary: Progress to fix T2903 Test Plan: Ran './bin/lipsum help' and 'generate' workflows. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2903 Differential Revision: https://secure.phabricator.com/D5672
This commit is contained in:
parent
1e6deff8ba
commit
4fb1a9e00f
5 changed files with 61 additions and 0 deletions
1
bin/lipsum
Symbolic link
1
bin/lipsum
Symbolic link
|
@ -0,0 +1 @@
|
|||
../scripts/lipsum/manage_lipsum.php
|
22
scripts/lipsum/manage_lipsum.php
Executable file
22
scripts/lipsum/manage_lipsum.php
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
$args = new PhutilArgumentParser($argv);
|
||||
$args->setTagline('manage lipsum');
|
||||
$args->setSynopsis(<<<EOSYNOPSIS
|
||||
**lipsum** __command__ [__options__]
|
||||
Manage Phabricator Test Data Generator.
|
||||
|
||||
EOSYNOPSIS
|
||||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = array(
|
||||
new PhabricatorLipsumGenerateWorkflow(),
|
||||
new PhutilHelpArgumentWorkflow(),
|
||||
);
|
||||
|
||||
$args->parseWorkflows($workflows);
|
|
@ -1036,6 +1036,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorLDAPUnknownUserException' => 'applications/auth/ldap/PhabricatorLDAPUnknownUserException.php',
|
||||
'PhabricatorLDAPUnlinkController' => 'applications/auth/controller/PhabricatorLDAPUnlinkController.php',
|
||||
'PhabricatorLintEngine' => 'infrastructure/lint/PhabricatorLintEngine.php',
|
||||
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
||||
'PhabricatorLipsumManagementWorkflow' => 'applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php',
|
||||
'PhabricatorLiskDAO' => 'infrastructure/storage/lisk/PhabricatorLiskDAO.php',
|
||||
'PhabricatorLocalDiskFileStorageEngine' => 'applications/files/engine/PhabricatorLocalDiskFileStorageEngine.php',
|
||||
'PhabricatorLocalTimeTestCase' => 'view/__tests__/PhabricatorLocalTimeTestCase.php',
|
||||
|
@ -2728,6 +2730,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorLDAPUnknownUserException' => 'Exception',
|
||||
'PhabricatorLDAPUnlinkController' => 'PhabricatorAuthController',
|
||||
'PhabricatorLintEngine' => 'PhutilLintEngine',
|
||||
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
|
||||
'PhabricatorLipsumManagementWorkflow' => 'PhutilArgumentWorkflow',
|
||||
'PhabricatorLiskDAO' => 'LiskDAO',
|
||||
'PhabricatorLocalDiskFileStorageEngine' => 'PhabricatorFileStorageEngine',
|
||||
'PhabricatorLocalTimeTestCase' => 'PhabricatorTestCase',
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorLipsumGenerateWorkflow
|
||||
extends PhabricatorLipsumManagementWorkflow {
|
||||
|
||||
protected function didConstruct() {
|
||||
$this
|
||||
->setName('generate')
|
||||
->setExamples('**generate**')
|
||||
->setSynopsis('Generate some Lipsum.')
|
||||
->setArguments(
|
||||
array(
|
||||
array(
|
||||
'name' => 'args',
|
||||
'wildcard' => true,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
public function execute(PhutilArgumentParser $args) {
|
||||
echo "Lipsum Generator";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
abstract class PhabricatorLipsumManagementWorkflow
|
||||
extends PhutilArgumentWorkflow {
|
||||
|
||||
final public function isExecutable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue