protected function ViewsDataExportExporterBaseTest::executeFullWrite in Views data export 7.4
14 calls to ViewsDataExportExporterBaseTest::executeFullWrite()
- CSVExportViewsDataExportExporterTests::testEncodingOptions in tests/exporter_tests/csv.test
- Test encoding options.
- CSVExportViewsDataExportExporterTests::testHTMLOptions in tests/exporter_tests/csv.test
- Test the HTML escaping option.
- CSVExportViewsDataExportExporterTests::testNewLineOptions in tests/exporter_tests/csv.test
- Test the newline replacement option.
- CSVExportViewsDataExportExporterTests::testQuoteOptions in tests/exporter_tests/csv.test
- CSVExportViewsDataExportExporterTests::testSeparatorOptions in tests/exporter_tests/csv.test
- Test out the exporter separator option with a few different characters.
... See full list
File
- tests/exporter_tests/base.test, line 5
Class
- ViewsDataExportExporterBaseTest
Code
protected function executeFullWrite($exporter, $rows, $row_count, $field_titles) {
$file = fopen('php://memory', 'w+');
foreach ($rows as $row) {
$exporter
->add_row($file, $row, $row_count, $field_titles);
$row_count++;
}
fseek($file, 0);
$contents = '';
while (!feof($file)) {
$contents .= fread($file, 8192);
}
fclose($file);
return $contents;
}