steffen: server/kolab-horde-framework/kolab-horde-framework/Data/tests csv_importFile_01.phpt, NONE, 1.1 simple_dos.csv, NONE, 1.1 simple_unix.csv, NONE, 1.1

cvs at intevation.de cvs at intevation.de
Fri Oct 14 16:33:06 CEST 2005


Author: steffen

Update of /kolabrepository/server/kolab-horde-framework/kolab-horde-framework/Data/tests
In directory doto:/tmp/cvs-serv28903/kolab-horde-framework/kolab-horde-framework/Data/tests

Added Files:
	csv_importFile_01.phpt simple_dos.csv simple_unix.csv 
Log Message:
Separated Horde Framework from kolab-resource-handlers

--- NEW FILE: csv_importFile_01.phpt ---
--TEST--
Simple CSV files
--FILE--
<?php

require 'Horde.php';
require 'Horde/Data.php';

$vcs = Horde_Data::singleton('csv');
var_dump($vcs->importFile(dirname(__FILE__) . '/simple_dos.csv', false, '', '', 4));
var_dump($vcs->importFile(dirname(__FILE__) . '/simple_unix.csv', false, '', '', 4));
var_dump($vcs->importFile(dirname(__FILE__) . '/simple_dos.csv', true, '', '', 4));
var_dump($vcs->importFile(dirname(__FILE__) . '/simple_unix.csv', true, '', '', 4));

?>
--EXPECT--
array(2) {
  [0]=>
  array(4) {
    [0]=>
    string(3) "one"
    [1]=>
    string(3) "two"
    [2]=>
    string(10) "three four"
    [3]=>
    string(6) "five
"
  }
  [1]=>
  array(4) {
    [0]=>
    string(3) "six"
    [1]=>
    string(5) "seven"
    [2]=>
    string(10) "eight nine"
    [3]=>
    string(6) " ten
"
  }
}
array(2) {
  [0]=>
  array(4) {
    [0]=>
    string(3) "one"
    [1]=>
    string(3) "two"
    [2]=>
    string(10) "three four"
    [3]=>
    string(5) "five
"
  }
  [1]=>
  array(4) {
    [0]=>
    string(3) "six"
    [1]=>
    string(5) "seven"
    [2]=>
    string(10) "eight nine"
    [3]=>
    string(5) " ten
"
  }
}
array(1) {
  [0]=>
  array(4) {
    ["one"]=>
    string(3) "six"
    ["two"]=>
    string(5) "seven"
    ["three four"]=>
    string(10) "eight nine"
    ["five
"]=>
    string(6) " ten
"
  }
}
array(1) {
  [0]=>
  array(4) {
    ["one"]=>
    string(3) "six"
    ["two"]=>
    string(5) "seven"
    ["three four"]=>
    string(10) "eight nine"
    ["five
"]=>
    string(5) " ten
"
  }
}
--- NEW FILE: simple_dos.csv ---
one,two,three four,five
six,seven,eight nine, ten

--- NEW FILE: simple_unix.csv ---
one,two,three four,five
six,seven,eight nine, ten





More information about the commits mailing list