TextParserTest.php 990 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\Parsing;
  13. use Spipu\Html2Pdf\Tests\CrossVersionCompatibility\TextParserTestCase;
  14. /**
  15. * Class TextParserTest
  16. */
  17. class TextParserTest extends TextParserTestCase
  18. {
  19. /**
  20. * Test if it works
  21. */
  22. public function testOk()
  23. {
  24. $result = $this->parser->prepareTxt('hello world', false);
  25. $this->assertSame('hello world', $result);
  26. $result = $this->parser->prepareTxt('hello world', true);
  27. $this->assertSame('hello world', $result);
  28. $result = $this->parser->prepareTxt('hello 10&euro; world');
  29. $this->assertSame('hello 10€ world', $result);
  30. $result = $this->parser->prepareTxt('hello &lt; world');
  31. $this->assertSame('hello < world', $result);
  32. }
  33. }