004.phpt 552 B

12345678910111213141516171819202122
  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. $fileFd = $excel->fileName('tutorial01.xlsx');
  10. $setHeader = $fileFd->header(['Item', 'Cost']);
  11. var_dump($setHeader);
  12. ?>
  13. --EXPECT--
  14. object(Vtiful\Kernel\Excel)#1 (2) {
  15. ["config":"Vtiful\Kernel\Excel":private]=>
  16. array(1) {
  17. ["path"]=>
  18. string(7) "./tests"
  19. }
  20. ["fileName":"Vtiful\Kernel\Excel":private]=>
  21. string(23) "./tests/tutorial01.xlsx"
  22. }