insert_date_custom_format.phpt 557 B

12345678910111213141516171819202122232425
  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('insert_date_custom_format.xlsx');
  12. $filePath = $fileObject->header(['date'])
  13. ->insertDate(1, 0, time(), 'mmm d yyyy hh:mm AM/PM')
  14. ->output();
  15. var_dump($filePath);
  16. ?>
  17. --CLEAN--
  18. <?php
  19. @unlink(__DIR__ . '/insert_date_custom_format.xlsx');
  20. ?>
  21. --EXPECT--
  22. string(38) "./tests/insert_date_custom_format.xlsx"