mPDFTest.php 372 B

1234567891011121314151617181920212223242526
  1. <?php
  2. class mPDFTest extends PHPUnit_Framework_TestCase
  3. {
  4. private $mpdf;
  5. public function setup()
  6. {
  7. parent::setup();
  8. $this->mpdf = new mPDF();
  9. }
  10. public function testPdfOutput()
  11. {
  12. $this->mpdf->writeHtml('<html><body>
  13. <h1>Test</h1>
  14. </body></html>');
  15. $output = $this->mpdf->Output(NULL, 'S');
  16. $this->assertStringStartsWith('%PDF-', $output);
  17. }
  18. }