protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); $environment1 = $input->getArgument('env1'); $environment2 = $input->getArgument('env2'); $output->writeln(sprintf("<info>Diff between <comment>%s</comment> and <comment>%s</comment></info>\n", $environment1, $environment2)); $diff = $this->app['configuration']->compareEnvironments($environment1, $environment2); $output->writeln(''); $table = new CliTable($diff); $table->enableFormattingTags()->setHeaders(array($environment1, $environment2))->displayKeys()->setValueRenderingFunction(function ($value) { return $this->formatValue($value); }); $output->writeln($table->render()); }
/** * @dataProvider providerTestSanityChecks * @expectedException \InvalidArgumentException */ public function testSanityChecks(array $values) { $table = new CliTable($values); $table->render(); }