public function testPdfInfoDeviceCreation() { $instance = new Ghostscript(); $pdfInfoPath = 'path/to/pdf_info.ps'; $pdfInfo = $instance->createPdfInfoDevice($pdfInfoPath); $this->assertInstanceOf(PdfInfo::class, $pdfInfo); $field = new \ReflectionProperty(PdfInfo::class, 'pdfInfoPath'); $field->setAccessible(true); $this->assertEquals($pdfInfoPath, $field->getValue($pdfInfo)); }