Skip to content

Commit 9e01722

Browse files
authored
Merge pull request #317 from cgoIT/master
fix: determine path to tmp folder dynamically due to errors on macos
2 parents bfe3d05 + de54d04 commit 9e01722

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/PdfTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ public function testCanFillFormFromData()
331331
$this->assertFileExists($file);
332332

333333
$tmpFile = (string) $pdf->getTmpFile();
334-
$regex = "#pdftk 'A'='$form' 'fill_form' '/tmp/[^ ]+\.xfdf' 'output' '$tmpFile' 'drop_xfa' 'need_appearances'#";
334+
$tmpBasePath = substr($tmpFile, 0, strpos($tmpFile, '/', 1));
335+
$regex = "#pdftk 'A'='$form' 'fill_form' '$tmpBasePath/[^ ]+\.xfdf' 'output' '$tmpFile' 'drop_xfa' 'need_appearances'#";
335336
$command = (string) $pdf->getCommand();
336337
if (phpUnitVersion('<', 9)) {
337338
$this->assertRegExp($regex, $command);

0 commit comments

Comments
 (0)