open_xlsx_sheet_list.phpt 603 B

123456789101112131415161718192021222324252627282930
  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_list.xlsx', 'TestSheet1')
  13. ->header(['Item', 'Cost'])
  14. ->output();
  15. $sheetList = $excel->openFile('open_xlsx_sheet_list.xlsx')->sheetList();
  16. var_dump(is_array($sheetList));
  17. var_dump($sheetList);
  18. ?>
  19. --CLEAN--
  20. <?php
  21. @unlink(__DIR__ . '/open_xlsx_sheet_list.xlsx');
  22. ?>
  23. --EXPECT--
  24. bool(true)
  25. array(1) {
  26. [0]=>
  27. string(10) "TestSheet1"
  28. }