protected function XMLExportViewsDataExportExporterTests::testBOF in Views data export 7.4
Test the opening XML.
File
- tests/
exporter_tests/ xml.test, line 31
Class
Code
protected function testBOF() {
$exporter = $this
->getExporter(array(
'field_labels' => array(
'name',
'age',
'job',
'created',
),
));
$BOF = $this
->executeBOF($exporter);
$expect = '<?xml version="1.0" encoding="UTF-8" ?>
<root>';
$result = strpos($BOF, $expect) == 0;
$this
->logVerboseResult($BOF, 'Actual result');
$this
->logVerboseResult($expect, 'Expected to contain');
$this
->assertTrue($result, 'The BOF is as expected.');
}