Ejemplo n.º 1
0
 public function testStringCommandDeclaration()
 {
     global $argv;
     $argv = ['test', 'mycommand'];
     ClearIce::reset();
     ClearIce::setStreamUrl('output', vfsStream::url('std/output'));
     ClearIce::addCommands('mycommand');
     $options = ClearIce::parse();
     $this->assertEquals('mycommand', $options['__command__']);
 }
 public function setup()
 {
     ClearIce::reset();
     ClearIce::addOptions(array('short' => 'i', 'long' => 'input', 'has_value' => true, 'help' => "specifies where the input files for the wiki are found."), array('short' => 'o', 'long' => 'output', 'has_value' => true, "help" => "specifies where the wiki should be written to"), array('short' => 'v', 'long' => 'verbose', "help" => "displays detailed information about everything that happens"), array('short' => 'x', 'long' => 'create-default-index', 'has_value' => false, "help" => "creates a default index page which lists all the wiki pages in a sorted order"), array('short' => 'd', 'long' => 'some-very-long-option-indeed', 'has_value' => false, "help" => "an uneccesarily long option which is meant to to see if the wrapping of help lines actually works."), array('short' => 's', 'has_value' => false, "help" => "a short option only"), array('long' => 'lone-long-option', 'has_value' => false, "help" => "a long option only"));
 }
Ejemplo n.º 3
0
 public function setup()
 {
     ClearIce::reset();
     ClearIce::addCommands(array('command' => 'init', 'help' => 'initialize a directory with the source files of the wiki'), array('command' => 'generate', 'help' => 'generate the data for a given directory and store it somewhere cool', 'usage' => 'generate --target=[TARGET]'), 'export');
     ClearIce::addOptions(array('command' => 'init', 'short' => 'd', 'long' => 'directory', 'has_value' => true, 'help' => "specify the directory to be initialized"), array('command' => 'init', 'short' => 't', 'long' => 'title', 'has_value' => true, 'help' => "title of the new wiki to be initialized"), array('command' => 'generate', 'short' => 't', 'long' => 'target', 'has_value' => true, "help" => "specify where the generated wiki should be"), array('command' => 'export', 'short' => 'f', 'long' => 'format', "help" => "specify the format of the exported wiki"), array('short' => 'v', 'long' => 'verbose', 'has_value' => false, "help" => "display more information"));
 }
Ejemplo n.º 4
0
 public function tearDown()
 {
     parent::tearDown();
     \clearice\ClearIce::reset();
 }
Ejemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     ClearIce::reset();
 }