You are here

public function TableTest::testStyle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Helper/TableTest.php \Symfony\Component\Console\Tests\Helper\TableTest::testStyle()

File

vendor/symfony/console/Tests/Helper/TableTest.php, line 494

Class

TableTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testStyle() {
  $style = new TableStyle();
  $style
    ->setHorizontalBorderChar('.')
    ->setVerticalBorderChar('.')
    ->setCrossingChar('.');
  Table::setStyleDefinition('dotfull', $style);
  $table = new Table($output = $this
    ->getOutputStream());
  $table
    ->setHeaders(array(
    'Foo',
  ))
    ->setRows(array(
    array(
      'Bar',
    ),
  ))
    ->setStyle('dotfull');
  $table
    ->render();
  $expected = <<<TABLE
.......
. Foo .
.......
. Bar .
.......

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