You are here

protected function CSVExportViewsDataExportExporterTests::testBOF in Views data export 7.4

Test the header writing.

File

tests/exporter_tests/csv.test, line 69

Class

CSVExportViewsDataExportExporterTests

Code

protected function testBOF() {
  $field_titles = array(
    'name',
    'age',
    'job',
    'created',
  );
  $result = $this
    ->executeBOF($this
    ->getExporter(array(
    'field_labels' => array(
      'name',
      'age',
      'job',
      'created',
    ),
  )), $field_titles);
  $expected = '"name","age","job","created"
';
  $this
    ->logVerboseResult($result, 'Actual result');
  $this
    ->logVerboseResult($expected, 'Expected result');
  $this
    ->assertEqual($result, $expected, 'The header is as expected.');
}