paper.phpt 589 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Check for vtiful presence
  3. --SKIPIF--
  4. <?php if (!extension_loaded("xlswriter")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. $config = [
  8. 'path' => './tests'
  9. ];
  10. $fileObject = new \Vtiful\Kernel\Excel($config);
  11. $fileObject = $fileObject->fileName('tutorial.xlsx');
  12. $filePath = $fileObject->header(['name', 'age'])
  13. ->data([
  14. ['viest', 21],
  15. ['wjx', 21]
  16. ])
  17. ->setPaper(\Vtiful\Kernel\Excel::PAPER_A3)
  18. ->setLandscape()
  19. ->output();
  20. var_dump($filePath);
  21. ?>
  22. --CLEAN--
  23. <?php
  24. @unlink(__DIR__ . '/tutorial.xlsx');
  25. ?>
  26. --EXPECT--
  27. string(21) "./tests/tutorial.xlsx"