public function tablesUnitTest::testFormatTableWordWrap

8.0.x tablesUnitTest.php public tablesUnitTest::testFormatTableWordWrap()
6.x tablesUnitTest.php public tablesUnitTest::testFormatTableWordWrap()
7.x tablesUnitTest.php public tablesUnitTest::testFormatTableWordWrap()
master tablesUnitTest.php public tablesUnitTest::testFormatTableWordWrap()

Tests drush_format_table() with word wrapping.

See also

drush_format_table().

File

tests/tablesUnitTest.php, line 105

Namespace

Unish

Class

tablesUnitTest
Unit tests for table formatting.

Code

public function testFormatTableWordWrap() {
  drush_set_context('DRUSH_COLUMNS', 60);
  $output = drush_format_table($this->words);
  $expected = ' Drush is a command  scripting         for Drupal         ' . PHP_EOL . ' line shell          interface                            ' . PHP_EOL . ' A veritable         Swiss Army knife  designed to make   ' . PHP_EOL . '                                       life easier for us ' . PHP_EOL;
  $this->assertEquals($expected, $output);
}