You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.1KB

  1. <?php
  2. class HTMLPurifier_HTMLModule_RubyTest extends HTMLPurifier_HTMLModuleHarness
  3. {
  4. public function setUp()
  5. {
  6. parent::setUp();
  7. $this->config->set('HTML.Doctype', 'XHTML 1.1');
  8. }
  9. public function testBasicUse()
  10. {
  11. $this->assertResult(
  12. '<ruby><rb>WWW</rb><rt>World Wide Web</rt></ruby>'
  13. );
  14. }
  15. public function testRPUse()
  16. {
  17. $this->assertResult(
  18. '<ruby><rb>WWW</rb><rp>(</rp><rt>World Wide Web</rt><rp>)</rp></ruby>'
  19. );
  20. }
  21. public function testComplexUse()
  22. {
  23. $this->assertResult(
  24. '<ruby>
  25. <rbc>
  26. <rb>10</rb>
  27. <rb>31</rb>
  28. <rb>2002</rb>
  29. </rbc>
  30. <rtc>
  31. <rt>Month</rt>
  32. <rt>Day</rt>
  33. <rt>Year</rt>
  34. </rtc>
  35. <rtc>
  36. <rt rbspan="3">Expiration Date</rt>
  37. </rtc>
  38. </ruby>'
  39. );
  40. /* not implemented
  41. function testBackwardsCompat()
  42. {
  43. $this->assertResult(
  44. '<ruby>A<rp>(</rp><rt>aaa</rt><rp>)</rp></ruby>',
  45. '<ruby><rb>A</rb><rp>(</rp><rt>aaa</rt><rp>)</rp></ruby>'
  46. );
  47. }
  48. */
  49. }
  50. }
  51. // vim: et sw=4 sts=4