コード例 #1
0
 public function testCsvSingleFileByFilenameFetcherManipulator()
 {
     $settings = array('FETCHER' => array('input_file' => dirname(__FILE__) . '/assets/csv/sample_metadata.csv', 'temp_directory' => $this->path_to_temp_dir, 'record_key' => 'ID', 'use_cache' => false), 'LOGGING' => array('path_to_log' => $this->path_to_log, 'path_to_manipulator_log' => ''), 'FILE_GETTER' => array('file_name_field' => 'File'), 'MANIPULATORS' => array('fetchermanipulators' => array('CsvSingleFileByFilename|postcard_1')));
     $csv = new Csv($settings);
     $records = $csv->getRecords();
     $this->assertCount(10, $records, "CsvSingleFileByFilename manipulator did not work");
 }
コード例 #2
0
ファイル: CsvTest.php プロジェクト: umlso-labs/mik
 public function testGetRecords()
 {
     // We define settings here, not in a settings file.
     $settings = array('FETCHER' => array('input_file' => dirname(__FILE__) . '/assets/test.csv'));
     $a = new Csv($settings);
     $records = $a->getRecords();
     $this->assertCount(3, $records);
 }
コード例 #3
0
ファイル: CsvFetcherTest.php プロジェクト: DiegoPino/mik
 public function testGetRecords()
 {
     // Define settings here, not in a configuration file.
     $settings = array('FETCHER' => array('input_file' => dirname(__FILE__) . '/assets/csv/sample_metadata.csv', 'temp_directory' => $this->path_to_temp_dir, 'record_key' => 'ID'), 'LOGGING' => array('path_to_log' => $this->path_to_log));
     $csv = new Csv($settings);
     $records = $csv->getRecords();
     $this->assertCount(20, $records);
 }