xref: /PHP-8.1/ext/com_dotnet/tests/bug66322.phpt (revision 56f90492)
1--TEST--
2Bug #66322 (COMPersistHelper::SaveToFile can save to wrong location)
3--EXTENSIONS--
4com_dotnet
5--SKIPIF--
6<?php
7try {
8    new COM('Word.Application');
9} catch (com_exception $ex) {
10    die('skip MS Word not available');
11}
12if (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);
21var_dump(file_exists($filename));
22$w->Quit();
23?>
24--EXPECT--
25bool(true)
26