php-src/ext/com_dotnet/tests/bug66322.phpt
Max Semenik 56f90492d6 Migrate skip checks to --EXTENSIONS--, p1
For rationale, see https://github.com/php/php-src/pull/6787

Extensions migrated in this part:
* bcmath
* bz2
* calendar
* com_dotnet
* ctype

Closes GH-6797.
2021-03-22 17:51:02 +01:00

26 lines
568 B
PHP

--TEST--
Bug #66322 (COMPersistHelper::SaveToFile can save to wrong location)
--EXTENSIONS--
com_dotnet
--SKIPIF--
<?php
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)