mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed paths to CSV fixtures for case-sensitive file systems.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63769 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3fcb8b518c
commit
2d9fcee4de
@ -3,7 +3,7 @@
|
|||||||
class CSVParserTest extends SapphireTest {
|
class CSVParserTest extends SapphireTest {
|
||||||
function testParsingWithHeaders() {
|
function testParsingWithHeaders() {
|
||||||
/* By default, a CSV file will be interpreted as having headers */
|
/* By default, a CSV file will be interpreted as having headers */
|
||||||
$csv = new CSVParser('sapphire/tests/dev/CSVBulkLoaderTest_PlayersWithHeader.csv');
|
$csv = new CSVParser('sapphire/tests/dev/CsvBulkLoaderTest_PlayersWithHeader.csv');
|
||||||
|
|
||||||
$firstNames = $birthdays = $biographies = array();
|
$firstNames = $birthdays = $biographies = array();
|
||||||
foreach($csv as $record) {
|
foreach($csv as $record) {
|
||||||
@ -25,7 +25,7 @@ class CSVParserTest extends SapphireTest {
|
|||||||
|
|
||||||
function testParsingWithHeadersAndColumnMap() {
|
function testParsingWithHeadersAndColumnMap() {
|
||||||
/* By default, a CSV file will be interpreted as having headers */
|
/* By default, a CSV file will be interpreted as having headers */
|
||||||
$csv = new CSVParser('sapphire/tests/dev/CSVBulkLoaderTest_PlayersWithHeader.csv');
|
$csv = new CSVParser('sapphire/tests/dev/CsvBulkLoaderTest_PlayersWithHeader.csv');
|
||||||
|
|
||||||
/* We can set up column remapping. The keys are case-insensitive. */
|
/* We can set up column remapping. The keys are case-insensitive. */
|
||||||
$csv->mapColumns(array(
|
$csv->mapColumns(array(
|
||||||
@ -53,7 +53,7 @@ class CSVParserTest extends SapphireTest {
|
|||||||
|
|
||||||
function testParsingWithExplicitHeaderRow() {
|
function testParsingWithExplicitHeaderRow() {
|
||||||
/* If your CSV file doesn't have a header row */
|
/* If your CSV file doesn't have a header row */
|
||||||
$csv = new CSVParser('sapphire/tests/dev/CSVBulkLoaderTest_PlayersWithHeader.csv');
|
$csv = new CSVParser('sapphire/tests/dev/CsvBulkLoaderTest_PlayersWithHeader.csv');
|
||||||
|
|
||||||
$csv->provideHeaderRow(array('__fn','__bio','__bd'));
|
$csv->provideHeaderRow(array('__fn','__bio','__bd'));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user