TokenTest.php 709 B

12345678910111213141516171819202122232425262728293031323334
  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 PHPUnit_Framework_TestCase;
  14. use Spipu\Html2Pdf\Parsing\Token;
  15. /**
  16. * Class TokenTest
  17. */
  18. class TokenTest extends PHPUnit_Framework_TestCase
  19. {
  20. /**
  21. * Test if it works
  22. */
  23. public function testOk()
  24. {
  25. $token = new Token('hello', 'world', 45);
  26. $this->assertSame('hello', $token->getType());
  27. $this->assertSame('world', $token->getData());
  28. $this->assertSame(45, $token->getLine());
  29. }
  30. }