Exemplo n.º 1
0
 /**
  * Csv_Reader should also be able to accept a csv dialect in its constructor or by setDialect()
  */
 public function test_Csv_Reader_Accepts_Custom_Dialect()
 {
     $reader = new Csv_Reader($this->files['comma-200'], new Mock_Dialect());
     $this->assertIsA($reader->getDialect(), 'Csv_Dialect');
     $reader->setDialect(new Mock_Dialect_Two());
     $this->assertIsA($reader->getDialect(), 'Mock_Dialect_Two');
 }
Exemplo n.º 2
0
 /**
  * @todo make this test assert something more substantial.
  * Csv_Reader should also be able to accept a csv dialect in its constructor or by setDialect()
  */
 public function test_Csv_Reader_Accepts_Custom_Dialect()
 {
     $reader = new Csv_Reader($this->files['comma-200'], new Csv_Dialect());
     $this->assertInstanceOf('Csv_Dialect', $reader->getDialect());
     $reader->setDialect(new Csv_Dialect());
     $this->assertInstanceOf('Csv_Dialect', $reader->getDialect());
 }