010.phpt 568 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Check for vtiful presence
  3. --SKIPIF--
  4. <?php if (!extension_loaded("excel_writer")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. $config = ['path' => './tests'];
  8. $excel = new \Vtiful\Kernel\Excel($config);
  9. $fileOne = $excel->fileName('tutorial01.xlsx')
  10. ->header(['test1'])
  11. ->data([
  12. ['data1'],
  13. ])
  14. ->output();
  15. $fileTwo = $excel->fileName('tutorial02.xlsx')
  16. ->header(['test2'])
  17. ->data([
  18. ['data2'],
  19. ])
  20. ->output();
  21. var_dump($fileOne,$fileTwo);
  22. ?>
  23. --EXPECT--
  24. string(23) "./tests/tutorial01.xlsx"
  25. string(23) "./tests/tutorial02.xlsx"