public function outputFormatUnitCase::testOutputFormat

8.0.x outputFormatUnitTest.php public outputFormatUnitCase::testOutputFormat($name, $format, $data, $expected)
6.x outputFormatUnitTest.php public outputFormatUnitCase::testOutputFormat($name, $format, $data, $expected)
7.x outputFormatUnitTest.php public outputFormatUnitCase::testOutputFormat($name, $format, $data, $expected)
master outputFormatUnitTest.php public outputFormatUnitCase::testOutputFormat($name, $format, $data, $expected)

Test various output formats using php-eval with no Drupal site.

@dataProvider provider

File

tests/outputFormatUnitTest.php, line 17
Tests for outputformat.drush.inc

Namespace

Unish

Class

outputFormatUnitCase

Code

public function testOutputFormat($name, $format, $data, $expected) {
  drush_preflight();
  $this->assertEquals($expected, trim(drush_format($data, array(), $format)), $name . ': ' . $format);
}