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