protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
 {
     $table = new Console\Helper\TableHelper();
     $output->writeln('Cluster overview:');
     $output->writeln('');
     $output->writeln('Nodes:');
     $cluster = $this->elastica->getCluster();
     $table->setHeaders(['name', 'documents', 'node', 'ip', 'port', 'hostname', 'version', 'transport address', 'http address']);
     $nodes = $cluster->getNodes();
     foreach ($nodes as $node) {
         $name = $node->getName();
         $ip = $node->getInfo()->getIp();
         $data = $node->getInfo()->getData();
         $port = $node->getInfo()->getPort();
         $stats = $node->getStats()->get();
         $table->addRow([$data['name'], $stats['indices']['docs']['count'], $name, $ip, $port, $data['hostname'], $data['version'], $data['transport_address'], $data['http_address']]);
     }
     $table->render($output);
     $table->setRows([]);
     /* INFO */
     $info = $this->elastica->request('', 'GET')->getData();
     $table->setHeaders(['name', 'version', 'status', 'ok']);
     $table->addRow([$info['name'], $info['version']['number'], $info['status'], $info['ok']]);
     $table->render($output);
     $table->setRows([]);
     $output->writeln('');
 }
Esempio n. 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->table = $this->getHelperSet()->get('table');
     $list = [];
     foreach ($this->laravel->firewall->report() as $ip) {
         $list[] = [$ip['ip_address'], $ip['whitelisted'] == false ? '' : '    X    ', $ip['whitelisted'] == false ? '    X    ' : ''];
     }
     $this->table->setHeaders(['IP Address', 'Whitelist', 'Blacklist'])->setRows($list);
     $this->table->render($this->getOutput());
 }
 /**
  * Renders a table of all errored entities
  */
 public function render()
 {
     $this->output->writeln('');
     $this->output->writeln('<info>Errors:</info>');
     $rows = array();
     foreach ($this->errors as $error) {
         $rows[] = array($error->getEntity(), $error->getResultId(), $error->getMessage());
     }
     $this->tableHelperSet->setHeaders(array('Entity', 'ID', 'Error'))->setRows($rows);
     $this->tableHelperSet->render($this->output);
 }
Esempio n. 4
0
 /**
  * Display results in table format.
  *
  * @param $table
  */
 public function displayTable($table)
 {
     $headers = $this->makeHeaders($table[0]);
     $rows = array();
     foreach ($table as $row) {
         $rows[] = (array) $row;
     }
     $this->table = $this->getHelperSet()->get('table');
     $this->table->setHeaders($headers)->setRows($rows);
     $this->table->render($this->getOutput());
 }
Esempio n. 5
0
 public function table(TableHelper $table)
 {
     $table->setLayout(TableHelper::LAYOUT_BORDERLESS);
     $table->setCellHeaderFormat('<info>%s</info>');
     $table->setCellRowFormat('%s');
     $table->render($this);
 }
Esempio n. 6
0
 /**
  * Execute command
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int|null|void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $registry = PlayerRegistry::getDefaultPlayers();
     $player1 = $input->getArgument('player-x');
     $player2 = $input->getArgument('player-o');
     $count = (int) $input->getOption('games');
     $progress = new ProgressHelper();
     $progress->start($output, $count);
     $stats = [PlayerInterface::SYMBOL_X => 0, PlayerInterface::SYMBOL_O => 0, 'Draw' => 0];
     for ($i = 0; $i < $count; $i++) {
         $game = new Game();
         $game->addPlayer($registry->get($player1, PlayerInterface::SYMBOL_X));
         $game->addPlayer($registry->get($player2), PlayerInterface::SYMBOL_O);
         $winner = $game->autoPlay();
         $stats[$winner ? $winner : 'Draw']++;
         $progress->advance();
     }
     $progress->finish();
     $output->writeln('');
     $output->writeln('Winning statistics');
     $table = new TableHelper();
     $table->setHeaders([$player1, $player2, "Draw"]);
     $table->addRow(array_values($stats));
     $table->render($output);
 }
Esempio n. 7
0
 /**
  * @param OutputInterface $output
  */
 public function render(OutputInterface $output)
 {
     if ($this->format == 'csv') {
         $this->renderCsv();
     } else {
         parent::render($output);
     }
 }
 /**
  * Display all the mapping information for a single Entity.
  *
  * @param string                 $entityName    Full or partial entity class name
  * @param EntityManagerInterface $entityManager
  * @param OutputInterface        $output
  */
 private function displayEntity($entityName, EntityManagerInterface $entityManager, OutputInterface $output)
 {
     $table = new TableHelper();
     $table->setHeaders(array('Field', 'Value'));
     $metadata = $this->getClassMetadata($entityName, $entityManager);
     array_map(array($table, 'addRow'), array_merge(array($this->formatField('Name', $metadata->name), $this->formatField('Root entity name', $metadata->rootEntityName), $this->formatField('Custom generator definition', $metadata->customGeneratorDefinition), $this->formatField('Custom repository class', $metadata->customRepositoryClassName), $this->formatField('Mapped super class?', $metadata->isMappedSuperclass), $this->formatField('Embedded class?', $metadata->isEmbeddedClass), $this->formatField('Parent classes', $metadata->parentClasses), $this->formatField('Sub classes', $metadata->subClasses), $this->formatField('Embedded classes', $metadata->subClasses), $this->formatField('Named queries', $metadata->namedQueries), $this->formatField('Named native queries', $metadata->namedNativeQueries), $this->formatField('SQL result set mappings', $metadata->sqlResultSetMappings), $this->formatField('Identifier', $metadata->identifier), $this->formatField('Inheritance type', $metadata->inheritanceType), $this->formatField('Discriminator column', $metadata->discriminatorColumn), $this->formatField('Discriminator value', $metadata->discriminatorValue), $this->formatField('Discriminator map', $metadata->discriminatorMap), $this->formatField('Generator type', $metadata->generatorType), $this->formatField('Table', $metadata->table), $this->formatField('Composite identifier?', $metadata->isIdentifierComposite), $this->formatField('Foreign identifier?', $metadata->containsForeignIdentifier), $this->formatField('Sequence generator definition', $metadata->sequenceGeneratorDefinition), $this->formatField('Table generator definition', $metadata->tableGeneratorDefinition), $this->formatField('Change tracking policy', $metadata->changeTrackingPolicy), $this->formatField('Versioned?', $metadata->isVersioned), $this->formatField('Version field', $metadata->versionField), $this->formatField('Read only?', $metadata->isReadOnly), $this->formatEntityListeners($metadata->entityListeners)), array($this->formatField('Association mappings:', '')), $this->formatMappings($metadata->associationMappings), array($this->formatField('Field mappings:', '')), $this->formatMappings($metadata->fieldMappings)));
     $table->render($output);
 }
Esempio n. 9
0
 /**
  * Display the results of calls in table format
  *
  * @param  TableHelper     $table
  * @param  mixed           $results
  * @param  OutputInterface $output
  *
  * @return string
  */
 public function displayTable(TableHelper $table, $results, OutputInterface $output)
 {
     $table->setHeaders(['Start Time', 'From', 'To', 'Status', 'Call ID']);
     $rows = $this->buildRows($results);
     if (!empty($rows)) {
         $table->setRows($rows);
     }
     $table->render($output);
 }
Esempio n. 10
0
 /**
  * @dataProvider testRenderProvider
  */
 public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected)
 {
     $table = new TableHelper();
     $table->setHeaders($headers)->setLayout($layout);
     foreach ($rows as $row) {
         $table->addRow($row);
     }
     $table->render($output = $this->getOutputStream());
     $this->assertEquals($expected, $this->getOutputContent($output));
 }
Esempio n. 11
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $request = new Request(Query::parse($input->getArgument('query')), $input->getArgument('index'), $input->getArgument('host'));
     $output->writeln('<info>Start benchmarking</info>');
     $output->writeln('');
     $result = (new Client($input->getOption('clear')))->execute($request, (int) $input->getOption('count'), $output);
     $output->writeln('');
     $table = new TableHelper();
     $table->setHeaders(['Field', 'Value']);
     $table->addRows($result->toArray());
     $table->render($output);
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $statsTable = $this->doExecute($input, $output);
     if (!$statsTable instanceof StatsTable) {
         throw new RuntimeException('StatsTable expected');
     }
     $dumper = null;
     if ($filename = $input->getOption('xls')) {
         $excelDumperOptions = array();
         if (method_exists($this, 'getExcelDumperOptions')) {
             $excelDumperOptions = $this->getExcelDumperOptions();
         }
         $dumper = new ExcelDumper($excelDumperOptions);
     } elseif ($filename = $input->getOption('csv')) {
         $csvDumperOptions = array();
         if (method_exists($this, 'getCSVDumperOptions')) {
             $csvDumperOptions = $this->getCSVDumperOptions();
         }
         $dumper = new CSVDumper($csvDumperOptions);
     } elseif ($filename = $input->getOption('html')) {
         $htmlDumperOptions = array();
         if (method_exists($this, 'getHTMLDumperOptions')) {
             $htmlDumperOptions = $this->getHTMLDumperOptions();
         }
         $dumper = new HTMLDumper($htmlDumperOptions);
     }
     if (null !== $dumper) {
         $contents = $dumper->dump($statsTable);
         if ($filename == '-') {
             $output->write($contents);
         } else {
             file_put_contents($filename, $contents);
         }
     } else {
         $tableHelper = new TableHelper();
         $tableHelper->setHeaders($statsTable->getHeaders());
         // Dump from CSV
         $dumper = new CSVDumper();
         $dumper->enableHeaders(false);
         $dumper->enableAggregation(false);
         $data = $dumper->dump($statsTable);
         $fp = fopen('php://temp', 'rw');
         fwrite($fp, $data);
         fseek($fp, 0, SEEK_SET);
         while ($line = fgetcsv($fp)) {
             $tableHelper->addRow($line);
         }
         if ($statsTable->getAggregations()) {
             $tableHelper->addRow($statsTable->getAggregations());
         }
         $tableHelper->render($output);
     }
 }
Esempio n. 13
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     chdir(__DIR__ . '/../..');
     $table = new TableHelper();
     $table->setHeaders(['Vendor name', 'Ahead', 'Permalink']);
     $vendorRows = array_filter(file('vendors.csv'));
     // Filter out empty rows.
     $githubApi = new GithubClient();
     /** @var Repo $repoApi */
     $repoApi = $githubApi->api('repo');
     if ($input->getOption('username')) {
         $password = $input->getOption('password');
         if (!$password) {
             $q = new Question(sprintf('Please enter the GitHub password for user <comment>%s</comment>:', $input->getOption('username')));
             $q->setHidden(true);
             $q->setValidator(function ($value) {
                 if (empty($value)) {
                     throw new \InvalidArgumentException('You must provide a password');
                 }
             });
             $password = $this->getHelper('question')->ask($input, $output, $q);
         }
         $githubApi->authenticate($input->getOption('username'), $password, GithubClient::AUTH_HTTP_PASSWORD);
     }
     foreach ($vendorRows as $vendorRow) {
         list($vendorName, $repoId, $latestCommitHash) = str_getcsv($vendorRow);
         // Repo ID is in the format author-name/repository-name.
         list($repoAuthor, $repoName) = explode('/', $repoId);
         // This provides us with much information, example: http://pastebin.com/raw.php?i=gkmUS9nU
         $headInfo = $repoApi->commits()->compare($repoAuthor, $repoName, $latestCommitHash, 'HEAD');
         $aheadBy = "<comment>Up to date!</comment>";
         $permalink = "";
         if ($headInfo['ahead_by']) {
             $permalink = $headInfo['permalink_url'];
             $additions = array_sum(array_map(function ($files) {
                 return $files['additions'];
             }, $headInfo['files']));
             $deletions = array_sum(array_map(function ($files) {
                 return $files['deletions'];
             }, $headInfo['files']));
             if ($additions) {
                 $additions = "<comment>+{$additions}</comment>";
             }
             if ($deletions) {
                 $deletions = "<info>-{$deletions}</info>";
             }
             $aheadBy = "<info>{$headInfo['ahead_by']}</info> commits ({$additions}/{$deletions})";
         }
         $table->addRow(["{$vendorName} (<info>{$repoId}</info>)", $aheadBy, $permalink]);
     }
     $table->render($output);
 }
Esempio n. 14
0
 private function listConfig(InputInterface $input, OutputInterface $output)
 {
     $output->writeln(["", "<error>Variables list</error>", ""]);
     $vars = ConfigQuery::create()->orderByName()->find();
     $rows = [];
     /** @var Config $var */
     foreach ($vars as $var) {
         $rows[] = [$var->getName(), $var->getValue(), $var->getSecured() !== 0 ? "yes" : "no", $var->getHidden() !== 0 ? "yes" : "no"];
     }
     $table = new TableHelper();
     $table->setHeaders(['Name', 'Value', 'secured', 'hidden'])->setRows($rows);
     $table->render($output);
 }
Esempio n. 15
0
 /**
  * @param OutputInterface $output
  */
 public function render(OutputInterface $output)
 {
     if (empty($this->issues)) {
         return;
     }
     foreach ($this->issues as $file => $issues) {
         $output->writeln(PHP_EOL . $file);
         $this->tableHelper->setHeaders($this->config['displayed-columns']);
         foreach ($issues as $issue) {
             if (empty($this->config['displayed-columns']['source']) || empty($issue['source'])) {
                 $this->renderIssue($issue);
             } else {
                 $this->renderIssueWithSource($issue);
             }
         }
         $this->tableHelper->render($output);
         $this->tableHelper->setRows(array());
     }
 }
Esempio n. 16
0
 /**
  * @inheritdoc
  */
 public function terminate(ResultCollection $collection, ResultCollection $groupedResults)
 {
     $output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true);
     //        $output->write(str_pad("\x0D", 80, "\x20"));
     //        $output->writeln('');
     // overview
     $total = $this->bound->calculate($collection);
     $output->writeln(sprintf('<info>%d</info> files have been analyzed. Read and understand these <info>%s</info> lines of code will take around <info>%s</info>.', sizeof($collection, COUNT_NORMAL), $total->getSum('loc'), $this->formatTime($total->getSum('time'))));
     $output->writeln('<info>Average for each module:</info>');
     $output->writeln('');
     $hasOOP = null !== $total->getSum('instability');
     $table = new TableHelper();
     $table->setHeaders(array_merge(array('Name', 'Complexity', 'Myer Distance', 'Maintainability', 'LLOC', 'Comment weight', 'Vocabulary', 'Volume', 'Bugs', 'Difficulty'), $hasOOP ? array('lcom', 'SysComplexity', 'Instability', 'Abstractness', 'ce', 'ca') : array()))->setLayout(TableHelper::LAYOUT_DEFAULT);
     foreach ($groupedResults as $result) {
         $table->addRow(array_merge(array(str_repeat('  ', $result->getDepth()) . $result->getName(), $this->getRow($result->getBounds(), 'cyclomaticComplexity', 'average', 0), $this->getRow($result->getBounds(), 'myerDistance', 'average', 0), $this->getRow($result->getBounds(), 'maintainabilityIndex', 'average', 0), $this->getRow($result->getBounds(), 'logicalLoc', 'sum', 0), $this->getRow($result->getBounds(), 'commentWeight', 'average', 0), $this->getRow($result->getBounds(), 'vocabulary', 'average', 0), $this->getRow($result->getBounds(), 'volume', 'average', 0), $this->getRow($result->getBounds(), 'bugs', 'sum', 2), $this->getRow($result->getBounds(), 'difficulty', 'average', 0)), $hasOOP ? array($this->getRow($result->getBounds(), 'lcom', 'average', 2), $this->getRow($result->getBounds(), 'rsysc', 'average', 2), $result->getInstability()->getInstability(), $result->getAbstractness()->getAbstractness(), $this->getRow($result->getBounds(), 'efferentCoupling', 'average', 2), $this->getRow($result->getBounds(), 'afferentCoupling', 'average', 2)) : array()));
     }
     $table->render($output);
     return $output->fetch();
 }
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $this->versionStorage = $this->getContainer()->get('phpcr_migrations.version_storage');
     $this->finder = $this->getContainer()->get('phpcr_migrations.version_finder');
     $versionCollection = $this->finder->getCollection();
     $executedVersions = (array) $this->versionStorage->getPersistedVersions();
     $currentVersion = $this->versionStorage->getCurrentVersion();
     $table = new TableHelper();
     $table->setHeaders(array('', 'Version', 'Date', 'Migrated', 'Path'));
     foreach ($versionCollection->getAllVersions() as $versionName => $versionClass) {
         $reflection = new \ReflectionClass($versionClass);
         $table->addRow(array($versionName == $currentVersion ? '*' : '', $versionName, $this->getDate($versionName), isset($executedVersions[$versionName]) ? '<info>' . $executedVersions[$versionName]['executed']->format('Y-m-d H:i:s') . '</info>' : 'n/a', substr($reflection->getFileName(), strlen(getcwd()) + 1)));
     }
     $table->render($output);
     if ($currentVersion) {
         $output->writeln(sprintf('<info>Current:</info> %s (%s)', $currentVersion, $this->getDate($currentVersion)));
     } else {
         $output->writeln('<info>No migrations have been executed</info>');
     }
 }
Esempio n. 18
0
 /** {@inheritdoc} */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $srcHost = $input->getArgument(self::ATTR_HOST);
     $srcPort = $input->getOption(self::OPT_PORT);
     $sort = $input->getOption(self::OPT_SORT);
     $order = $input->getOption(self::OPT_ORDER);
     $noZeros = $input->getOption(self::OPT_NO_ZEROS);
     $columns = ['name' => 'name', 'current-jobs-ready' => 'ready', 'current-jobs-reserved' => 'reserved', 'current-jobs-delayed' => 'delayed', 'current-jobs-buried' => 'buried'];
     $src = new Pheanstalk($srcHost, $srcPort);
     $table = new TableHelper(false);
     $table->setLayout(TableHelper::LAYOUT_BORDERLESS);
     $table->setHeaders($columns);
     $tubeNames = $src->listTubes();
     ksort($tubeNames);
     $data = [];
     foreach ($tubeNames as $tube) {
         /** @var ArrayResponse $response */
         $response = $src->statsTube($tube);
         $tubeData = $response->getArrayCopy();
         $tubeData = array_intersect_key($tubeData, $columns);
         if ($noZeros) {
             foreach ($tubeData as $key => $value) {
                 if ('0' === $value) {
                     $tubeData[$key] = '';
                 }
             }
         }
         $data[] = $tubeData;
     }
     $column = array_search($sort, $columns);
     uasort($data, function (array $a1, array $a2) use($column, $order) {
         return strnatcmp($a1[$column], $a2[$column]) * $order;
     });
     $table->addRows($data);
     $table->render($output);
 }
Esempio n. 19
0
    public function testRenderMultiByte()
    {
        if (!function_exists('mb_strlen')) {
            $this->markTestSkipped('The "mbstring" extension is not available');
        }
        $table = new TableHelper();
        $table->setHeaders(array('■■'))->setRows(array(array(1234)))->setLayout(TableHelper::LAYOUT_DEFAULT);
        $table->render($output = $this->getOutputStream());
        $expected = <<<TABLE
+------+
| ■■   |
+------+
| 1234 |
+------+

TABLE;
        $this->assertEquals($expected, $this->getOutputContent($output));
    }
Esempio n. 20
0
 /**
  * Display the route information on the console.
  *
  * @param  array  $routes
  * @return void
  */
 protected function displayRoutes(array $routes)
 {
     $headers = array('Domain', 'URI', 'Name', 'Action', 'Before Filters', 'After Filters');
     $this->table->setHeaders($headers)->setRows($routes);
     $this->table->render($this->getOutput());
 }
Esempio n. 21
0
    /**
     * @requires extension mbstring
     */
    public function testRenderFullWidthCharacters()
    {
        $table = new TableHelper();
        $table->setHeaders(array('あいうえお'))->setRows(array(array(1234567890)))->setLayout(TableHelper::LAYOUT_DEFAULT);
        $table->render($output = $this->getOutputStream());
        $expected = <<<'TABLE'
+------------+
| あいうえお |
+------------+
| 1234567890 |
+------------+

TABLE;
        $this->assertEquals($expected, $this->getOutputContent($output));
    }
    $output->writeln(sprintf('%s products are in more than one variant group. This is not permitted anymore', count($products)));
    $output->writeln('Products in more than one variant group :');
    $lines = [];
    $tableHelper = new TableHelper();
    $tableHelper->setHeaders(['identifier', 'groups']);
    foreach ($products as $product) {
        $line = [];
        $line['identifier'] = (string) $product->getIdentifier();
        $line['groups'] = [];
        foreach ($product->getGroups() as $group) {
            $line['groups'][] = $group->getCode();
        }
        $lines[] = $line;
        $tableHelper->addRow([$line['identifier'], implode(', ', $line['groups'])]);
    }
    $tableHelper->render($output);
    $dialogHelper = new DialogHelper();
    if ($dialogHelper->askConfirmation($output, 'Would you like to generate a csv file to fix all those products ? (Y,n) ')) {
        $tmpFolder = sys_get_temp_dir();
        $filePath = $tmpFolder . '/invalid_product.csv';
        if (!is_writable($tmpFolder)) {
            throw new \Exception(sprintf('The filepath %s is not writable', $filePath));
        }
        $csv = sprintf("%s;groups\n", $identifierCode);
        foreach ($lines as $line) {
            $csv .= sprintf("%s;%s\n", $line['identifier'], implode(',', $line['groups']));
        }
        file_put_contents($filePath, $csv);
        $output->writeln(sprintf('Generated CSV product import : %s', $filePath));
    }
} else {
 private function processInfo($name, OutputInterface $output)
 {
     $processInfo = $this->supervisor->getProcessInfo($name);
     $tableHelper = new Console\Helper\TableHelper();
     $tableHelper->setHeaders($this->infoHeaders);
     $row = [];
     foreach ($this->infoHeaders as $key) {
         $row[$key] = $processInfo[$key];
     }
     $tableHelper->addRow($row);
     $tableHelper->render($output);
 }
Esempio n. 24
0
 /**
  * Writes content to output.
  *
  * @param TableHelper $table
  * @param bool        $decorated
  */
 protected function renderTable(TableHelper $table, $decorated = false)
 {
     if (!$decorated) {
         $table->setCellRowFormat('%s');
         $table->setCellHeaderFormat('%s');
     }
     $table->render($this->output);
 }
Esempio n. 25
0
 /**
  * Display the route information on the console.
  *
  * @param  array  $routes
  * @return void
  */
 protected function displayRoutes(array $routes)
 {
     $this->table->setHeaders($this->headers)->setRows($routes);
     $this->table->render($this->getOutput());
 }
Esempio n. 26
0
 public function dumpToConsole(OutputInterface $output, TableHelper $table)
 {
     $table->setHeaders(array('Entity Type', 'Bundle', 'Label', 'Description'));
     /** @var $node AbstractEntityTypeBuilder */
     foreach ($this->entityTypes as $entity) {
         $rows[] = array($entity->getEntityType(), $entity->getBundle(), $entity->getLabel(), $entity->getDescription());
     }
     $table->setRows($rows);
     $rows = array();
     $table->render($output);
     $table->setHeaders(array('Field Name', 'Field Type'));
     /** @var $field FieldBuilder */
     foreach ($this->fields as $field) {
         $rows[] = array($field->getName(), $field->getType());
     }
     $table->setRows($rows);
     $table->render($output);
     $rows = array();
     $table->setHeaders(array('Entity', 'Field', 'Label', 'Widget'));
     /** @var $instance AttachedInstanceBuilder */
     foreach ($this->instances as $instance) {
         $rows[] = array($instance->getEntityType() . ':' . $instance->getBundle(), $instance->getFieldName(), $instance->getLabel(), $instance->getWidget()->getType());
     }
     $table->setRows($rows);
     $table->render($output);
 }
    public function testRenderFullWidthCharacters()
    {
        if (!function_exists('mb_strwidth')) {
            $this->markTestSkipped('The "mbstring" extension is not available');
        }
        $table = new TableHelper();
        $table->setHeaders(array('あいうえお'))->setRows(array(array(1234567890)))->setLayout(TableHelper::LAYOUT_DEFAULT);
        $table->render($output = $this->getOutputStream());
        $expected = <<<TABLE
+------------+
| あいうえお |
+------------+
| 1234567890 |
+------------+

TABLE;
        $this->assertEquals($expected, $this->getOutputContent($output));
    }