protection_password.phpt 550 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 = [
  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. ->protection('password')
  18. ->output();
  19. var_dump($filePath);
  20. ?>
  21. --CLEAN--
  22. <?php
  23. @unlink(__DIR__ . '/tutorial.xlsx');
  24. ?>
  25. --EXPECT--
  26. string(21) "./tests/tutorial.xlsx"