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