sanitizeFile($sourceFilepath, $targetFilepath); $this->assertFileExists($targetFilepath); (new Filesystem())->remove($targetFilepath); } public function testAcceptsPdfs(): void { $tempDir = realpath(__DIR__.'/../../../temp'); $sourceFilepath = realpath(__DIR__.'/../../Resources/upload.pdf'); $targetFilepath = $tempDir.'/test.pdf'; $sanitizer = new Sanitizer('/usr/bin/gs', '/usr/bin/convert', $tempDir); $sanitizer->sanitizeFile($sourceFilepath, $targetFilepath); $this->assertFileExists($targetFilepath); (new Filesystem())->remove($targetFilepath); } }