You are here

protected function TXTExportViewsDataExportTests::getExportView in Views data export 7.4

Same name and namespace in other branches
  1. 7.3 tests/txt_export.test \TXTExportViewsDataExportTests::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/txt_export.test, line 21

Class

TXTExportViewsDataExportTests

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]

1
[Name]

John
[Age]

25
----------------------------------------

[ID]

2
[Name]

George
[Age]

27
----------------------------------------

[ID]

3
[Name]

Ringo
[Age]

28
----------------------------------------

[ID]

4
[Name]

Paul
[Age]

26
----------------------------------------

[ID]

5
[Name]

Meredith
[Age]

30
----------------------------------------';
  return array(
    &$view,
    $expected,
  );
}