protected function XLSExportViewsDataExportTests::getExportView in Views data export 7.4
Same name and namespace in other branches
- 7.3 tests/xls_export.test \XLSExportViewsDataExportTests::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/
xls_export.test, line 21
Class
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 = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><dimension ref="A1:A1"/><sheetData> ' . '
<row><c r="A1"><v>1</v></c><c r="B1" t="inlineStr"><is><t>John</t></is></c><c r="C1"><v>25</v></c></row>
<row><c r="A2"><v>2</v></c><c r="B2" t="inlineStr"><is><t>George</t></is></c><c r="C2"><v>27</v></c></row>
<row><c r="A3"><v>3</v></c><c r="B3" t="inlineStr"><is><t>Ringo</t></is></c><c r="C3"><v>28</v></c></row>
<row><c r="A4"><v>4</v></c><c r="B4" t="inlineStr"><is><t>Paul</t></is></c><c r="C4"><v>26</v></c></row>
<row><c r="A5"><v>5</v></c><c r="B5" t="inlineStr"><is><t>Meredith</t></is></c><c r="C5"><v>30</v></c></row>
</sheetData></worksheet>';
return array(
&$view,
$expected,
);
}