| Conditions | 2 |
| Paths | 2 |
| Total Lines | 29 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testFile() |
||
| 14 | { |
||
| 15 | $tempDir = __DIR__ . '/../data/'; |
||
| 16 | $filename = tempnam($tempDir, "xlsx_writer_"); |
||
| 17 | $sheet = new Sheet( |
||
| 18 | [ |
||
| 19 | 'filename' => $filename, |
||
| 20 | 'sheetname' => 'sheet_1', |
||
| 21 | 'xmlname' => 'sheet_1', |
||
| 22 | 'row_count' => 0, |
||
| 23 | 'columns' => [], |
||
| 24 | 'merge_cells' => [], |
||
| 25 | 'max_cell_tag_start' => 0, |
||
| 26 | 'max_cell_tag_end' => 0, |
||
| 27 | 'auto_filter' => false, |
||
| 28 | 'freeze_rows' => false, |
||
| 29 | 'freeze_columns' => false, |
||
| 30 | 'finalized' => false, |
||
| 31 | ], 'xlsx' |
||
| 32 | ); |
||
| 33 | |||
| 34 | $sheet->fileWriter->ftell(); |
||
| 35 | $this->assertSame(0, $sheet->fileWriter->ftell()); |
||
| 36 | $string = ''; |
||
| 37 | for($i=0;$i< 10;$i++) { |
||
| 38 | $string .= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
| 39 | } |
||
| 40 | $sheet->fileWriter->write($string); |
||
| 41 | $this->assertSame(620, $sheet->fileWriter->ftell()); |
||
| 42 | } |
||
| 44 |