+
+ public function test_pdf_command_option_does_not_leave_temp_files()
+ {
+ $tempDir = sys_get_temp_dir();
+ $startTempFileCount = iterator_count((new FileSystemIterator($tempDir, FilesystemIterator::SKIP_DOTS)));
+
+ $page = $this->entities->page();
+ $command = 'cp {input_html_path} {output_pdf_path}';
+ config()->set('exports.pdf_command', $command);
+
+ $this->asEditor()->get($page->getUrl('/export/pdf'));
+
+ $afterTempFileCount = iterator_count((new FileSystemIterator($tempDir, FilesystemIterator::SKIP_DOTS)));
+ $this->assertEquals($startTempFileCount, $afterTempFileCount);
+ }