018.phpt 485 B

12345678910111213141516171819202122232425
  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. $fileObject = $excel->fileName("18.xlsx");
  10. $fileObject->header(['name', 'age'])
  11. ->data([['viest', 21]])
  12. ->data([['wjx', 21]]);
  13. $filePath = $fileObject->output();
  14. var_dump($filePath);
  15. ?>
  16. --CLEAN--
  17. <?php
  18. @unlink(__DIR__ . '/18.xlsx');
  19. ?>
  20. --EXPECT--
  21. string(15) "./tests/18.xlsx"