You are here

protected function CSVExportViewsDataExportTests::getExportView in Views data export 7.4

Same name and namespace in other branches
  1. 7.3 tests/csv_export.test \CSVExportViewsDataExportTests::getExportView()

Get a very basic view and expected output for this style.

Return value

An array containing two elements:

  • A View object, for the export.
  • The expected out from that view, if is was executed without further changes.

Overrides ViewsDataExportSimpleExportTest::getExportView

File

tests/csv_export.test, line 21

Class

CSVExportViewsDataExportTests

Code

protected function getExportView($path = 'vde_test') {

  // Create the basic view.
  $view = $this
    ->getBasicExportView();
  $display = $view
    ->new_display('views_data_export', 'Data export', 'vde_test');
  $display
    ->override_option('style_plugin', $this
    ->getStylePluginName());
  $display
    ->override_option('path', $path);
  $expected = '"ID","Name","Age"
"1","John","25"
"2","George","27"
"3","Ringo","28"
"4","Paul","26"
"5","Meredith","30"';
  return array(
    &$view,
    $expected,
  );
}