bug66322.phpt 568 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #66322 (COMPersistHelper::SaveToFile can save to wrong location)
  3. --EXTENSIONS--
  4. com_dotnet
  5. --SKIPIF--
  6. <?php
  7. try {
  8. new COM('Word.Application');
  9. } catch (com_exception $ex) {
  10. die('skip MS Word not available');
  11. }
  12. if (getenv("SKIP_SLOW_TESTS")) die('skip slow test');
  13. ?>
  14. --FILE--
  15. <?php
  16. $w = new COM('Word.Application');
  17. $doc = $w->Documents->Add();
  18. $ph = new COMPersistHelper($doc);
  19. $filename = __DIR__ . '\\..\\' . basename(__DIR__) . '\\66322.docx';
  20. $ph->SaveToFile($filename);
  21. var_dump(file_exists($filename));
  22. $w->Quit();
  23. ?>
  24. --EXPECT--
  25. bool(true)