Example #1
0
 public function testReadAll()
 {
     $reader = new Reader();
     $reader->filePath = __DIR__ . '/files/3cols.ods';
     $reader->colsCount = 3;
     $reader->init();
     $expecteds = array(array('first', 'second', 'third'), array('1', '2', '3'), array('s1', 's2', 's3'));
     $this->assertEquals($expecteds, $reader->readAll());
 }
Example #2
0
 public function testLabels()
 {
     $reader = new Reader();
     $reader->filePath = __DIR__ . '/files/3cols.xls';
     $reader->useLabels = true;
     $reader->labels = array('first', 'second', 'third');
     $reader->ignoredRowsCount = 1;
     $reader->init();
     $expected = array(array('first' => '1', 'second' => '2', 'third' => '3'), array('first' => 's1', 'second' => 's2', 'third' => 's3'));
     $this->assertEquals($expected, $reader->readAll());
 }