015.phpt 510 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Check for vtiful presence
  3. --SKIPIF--
  4. <?php if (!extension_loaded("xlswriter")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. $config = ['path' => './tests'];
  8. $excel = new \Vtiful\Kernel\Excel($config);
  9. $filePath = $excel->fileName("15.xlsx")
  10. ->header(['name', 'age'])
  11. ->data([
  12. ['one', 10],
  13. ['two', 20],
  14. ['three', 30],
  15. ])
  16. ->autoFilter("A1:B3")
  17. ->output();
  18. var_dump($filePath);
  19. ?>
  20. --CLEAN--
  21. <?php
  22. @unlink(__DIR__ . '/15.xlsx');
  23. ?>
  24. --EXPECT--
  25. string(15) "./tests/15.xlsx"