Example #1
0
 /**
  * 
  */
 public function test_Reader_Automatically_Detects_Dialect()
 {
     $reader = new Csv_Reader('data/pipe-100.csv');
     // didnt provide a dialect, so it should detect format
     $dialect = $reader->getDialect();
     $this->assertIsA($dialect, 'Csv_Dialect');
     $this->assertEqual($dialect->delimiter, "|");
     $this->assertEqual($dialect->quotechar, '"');
     $this->assertEqual($dialect->quoting, Csv_Dialect::QUOTE_NONE);
 }
 /**
  *
  */
 public function test_Reader_Automatically_Detects_Dialect()
 {
     $reader = new Csv_Reader($this->files['pipe-100']);
     // didnt provide a dialect, so it should detect format
     $dialect = $reader->getDialect();
     $this->assertInstanceOf('Csv_Dialect', $dialect);
     $this->assertEquals($dialect->delimiter, "|");
     $this->assertEquals($dialect->quotechar, '"');
     $this->assertEquals($dialect->quoting, Csv_Dialect::QUOTE_NONE);
 }