function it_renders()
 {
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output, new Console());
     $this->render();
 }
 function it_does_not_dump_empty_config()
 {
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $config = new Config();
     $this->run($input, $output, $config);
 }
Exemple #3
0
 function it_renders()
 {
     $ex = new Exception();
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($ex);
 }
 function it_renders()
 {
     $command = new Command('command', 'description');
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($command);
 }
 function it_renders_without_Commands(IConsole $console)
 {
     $console->getCommands()->willReturn([]);
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($console);
 }
Exemple #6
0
 function it_uses_self_as_command(IInput $input)
 {
     $console = new Console();
     $input->hasArgument('command')->willReturn(false);
     $input->getCommand()->willReturn(new Command());
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->run($input, $output, $console);
 }
 function it_renders()
 {
     $command = new Command();
     $command->setHelp('help');
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($command);
 }
Exemple #8
0
 function it_renders()
 {
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->setIndent(2)->setGutter(1)->setSectionIndent(1)->setVerticalSeparator('|');
     $this->setTitle('title')->addRow('key', 'value')->addSection('section')->addRow('another key', 'another value')->addSection('another section')->addRow(['text value', 'some value']);
     $this->render();
 }
 function it_renders()
 {
     $console = new Console();
     $console->setTitle(null);
     $console->setDescription(null);
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($console);
 }
 function it_renders()
 {
     $command = new Command();
     $command->option(OptionType::SINGLE, '--name', '-a');
     $command->option(OptionType::INCREMENTAL, '--name', '-n');
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($command);
 }
 function it_renders()
 {
     $command = new Command();
     $command->argument(ArgumentType::SINGLE, 'single');
     $command->argument(ArgumentType::SINGLE_OPTIONAL, 'single_optional');
     $command->argument(ArgumentType::MULTIPLE, 'multiple');
     $command->argument(ArgumentType::MULTIPLE_OPTIONAL, 'multiple_optional');
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($command);
 }
 function it_renders()
 {
     $command = new Command();
     $command->argument(ArgumentType::SINGLE, 'arg1');
     $command->argument(ArgumentType::SINGLE_OPTIONAL, 'arg2');
     $command->argument(ArgumentType::MULTIPLE, 'arg3');
     $command->argument(ArgumentType::MULTIPLE_OPTIONAL, 'arg4');
     $command->option(OptionType::SINGLE, '--opt1', '-1');
     $command->option(OptionType::SINGLE_OPTIONAL, '--opt2', '-2');
     $command->option(OptionType::MULTIPLE, '--opt3', '-3');
     $command->option(OptionType::MULTIPLE_OPTIONAL, '--opt4', '-4');
     $command->option(OptionType::BOOLEAN, '--opt5', '-5');
     $command->option(OptionType::INCREMENTAL, '--opt6', '-6');
     $input = new Input();
     $output = new Output();
     $output->setEnableBuffering(true);
     $this->beConstructedWith($input, $output);
     $this->render($command);
 }