public function NodeImportAPITestCase::testNoEscapeCharacter in Node import 6
Test reading from files without an escape character. See #739786.
File
- tests/
node_import.test, line 166
Class
Code
public function testNoEscapeCharacter() {
$filepath = drupal_get_path('module', 'node_import') . '/tests/no-escape.txt';
$file_offset = 0;
$file_options = array(
'record separator' => '<newline>',
'field separator' => '|',
'text delimiter' => '%',
'escape character' => '<none>',
);
$file_data = array(
array(
'title',
'description',
),
array(
'Book',
'Book description goes here...',
),
);
$data = $this
->readFromFile($filepath, $file_offset, $file_options);
$this
->assertTrue($this
->compareData($data, $file_data), t('Correctly read data from file.'));
}