const_memory.phpt 502 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Check for vtiful presence
  3. --SKIPIF--
  4. <?php if (!extension_loaded("xlswriter")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. $excel = new \Vtiful\Kernel\Excel([
  8. 'path' => './tests',
  9. ]);
  10. $fileObject = $excel->constMemory('const_memory.xlsx');
  11. $fileHandle = $fileObject->getHandle();
  12. $path = $fileObject->header(['name', 'age'])
  13. ->data([['viest', 21]])
  14. ->output();
  15. var_dump($path);
  16. ?>
  17. --CLEAN--
  18. <?php
  19. @unlink(__DIR__ . '/const_memory.xlsx');
  20. ?>
  21. --EXPECT--
  22. string(25) "./tests/const_memory.xlsx"