zoom.phpt 530 B

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