HtmlTestCase.php 907 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Html2Pdf Library - Tests
  4. *
  5. * HTML => PDF converter
  6. * distributed under the OSL-3.0 License
  7. *
  8. * @package Html2pdf
  9. * @author Laurent MINGUET <webmaster@html2pdf.fr>
  10. * @copyright 2023 Laurent MINGUET
  11. */
  12. namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
  13. use PHPUnit\Framework\TestCase;
  14. use Spipu\Html2Pdf\Parsing\Html;
  15. abstract class HtmlTestCase extends TestCase
  16. {
  17. /**
  18. * @var Html
  19. */
  20. protected $object;
  21. protected function setUp(): void
  22. {
  23. $textParser = $this->getMockBuilder('Spipu\Html2Pdf\Parsing\TextParser')
  24. ->disableOriginalConstructor()
  25. ->setMethods(['prepareTxt'])
  26. ->getMock();
  27. $textParser
  28. ->expects($this->any())
  29. ->method('prepareTxt')
  30. ->willReturnCallback([$this, 'mockPrepareTxt']);
  31. $this->object = new Html($textParser);
  32. }
  33. }