public function testToString() { $outFile = $this->getOutFile(); $binary = $this->getBinary(); $pdf = new Pdf('<html><h1>Test</h1></html>'); $pdf->binary = $binary; $this->assertTrue($pdf->saveAs($outFile)); $this->assertFileExists($outFile); $this->assertEquals(file_get_contents($outFile), $pdf->toString()); unlink($outFile); }