4 $root = dirname(dirname(dirname(__FILE__
)));
5 require_once $root.'/scripts/__init_script__.php';
7 $args = new PhutilArgumentParser($argv);
8 $args->setTagline(pht('emit a test event'));
9 $args->setSynopsis(<<<EOHELP
10 **emit_test_event.php** [--listen listener] ...
11 Emit a test event after installing any specified __listener__s.
14 $args->parseStandardArguments();
19 'param' => 'listener',
24 $console = PhutilConsole
::getConsole();
25 foreach ($args->getArg('listen') as $listener) {
26 $console->writeOut("%s\n", pht("Installing '%s'...", $listener));
27 newv($listener, array())->register();
31 $console->writeOut("%s\n", pht('Emitting event...'));
33 PhutilEventEngine
::dispatchEvent(
35 PhabricatorEventType
::TYPE_TEST_DIDRUNTEST
,
40 $console->writeOut("%s\n", pht('Done.'));