open_xlsx_sheet_flag.phpt 836 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Check for vtiful presence
  3. --SKIPIF--
  4. <?php
  5. require __DIR__ . '/include/skipif.inc';
  6. skip_disable_reader();
  7. ?>
  8. --FILE--
  9. <?php
  10. $config = ['path' => './tests'];
  11. $excel = new \Vtiful\Kernel\Excel($config);
  12. $filePath = $excel->fileName('open_xlsx_sheet_flag.xlsx')
  13. ->header(['Item', 'Cost'])
  14. ->output();
  15. $data = $excel->openFile('open_xlsx_sheet_flag.xlsx')
  16. ->openSheet('Sheet1', \Vtiful\Kernel\Excel::SKIP_EMPTY_CELLS);
  17. var_dump($data);
  18. ?>
  19. --CLEAN--
  20. <?php
  21. @unlink(__DIR__ . '/open_xlsx_sheet_flag.xlsx');
  22. ?>
  23. --EXPECT--
  24. object(Vtiful\Kernel\Excel)#1 (3) {
  25. ["config":"Vtiful\Kernel\Excel":private]=>
  26. array(1) {
  27. ["path"]=>
  28. string(7) "./tests"
  29. }
  30. ["fileName":"Vtiful\Kernel\Excel":private]=>
  31. string(33) "./tests/open_xlsx_sheet_flag.xlsx"
  32. ["read_row_type":"Vtiful\Kernel\Excel":private]=>
  33. NULL
  34. }