getCommand() public method

public getCommand ( ) : Command
return Command the command instance that executes wkhtmltopdf
Esempio n. 1
0
 public function testCanUseXvfbRun()
 {
     $inFile = $this->getHtmlAsset();
     $outFile = $this->getOutFile();
     $binary = $this->getBinary();
     $pdf = new Pdf(array('binary' => $binary, 'commandOptions' => array('enableXvfb' => true)));
     $this->assertInstanceOf('mikehaertl\\wkhtmlto\\Pdf', $pdf->addPage($inFile));
     $this->assertTrue($pdf->saveAs($outFile));
     $tmpFile = $pdf->getPdfFilename();
     $this->assertEquals("xvfb-run -a --server-args=\"-screen 0, 1024x768x24\" {$binary} '{$inFile}' '{$tmpFile}'", (string) $pdf->getCommand());
     unlink($outFile);
 }