You are here

protected function DOCExportViewsDataExportExporterTests::testBOF in Views data export 7.4

Test the header writing.

File

tests/exporter_tests/doc.test, line 69

Class

DOCExportViewsDataExportExporterTests

Code

protected function testBOF() {
  $result = $this
    ->executeBOF($this
    ->getExporter(array(
    'field_labels' => array(
      'Name',
      'Age',
      'Job',
      'Created',
    ),
  )));
  $expected = '<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  <body>
    <table>
      <thead><tr><th>Name</th><th>Age</th><th>Job</th><th>Created</th></tr></thead>
      <tbody>
';
  $this
    ->logVerboseResult($result, 'Actual result');
  $this
    ->logVerboseResult($expected, 'Expected result');
  $this
    ->assertEqual($result, $expected, 'The header is as expected.');
}