BackgroundTest.php 617 B

1234567891011121314151617181920212223
  1. <?php
  2. class HTMLPurifier_AttrDef_CSS_BackgroundTest extends HTMLPurifier_AttrDefHarness
  3. {
  4. function test() {
  5. $config = HTMLPurifier_Config::createDefault();
  6. $this->def = new HTMLPurifier_AttrDef_CSS_Background($config);
  7. $valid = '#333 url("chess.png") repeat fixed 50% top';
  8. $this->assertDef($valid);
  9. $this->assertDef('url(\'chess.png\') #333 50% top repeat fixed', $valid);
  10. $this->assertDef(
  11. 'rgb(34, 56, 33) url(chess.png) repeat fixed top',
  12. 'rgb(34,56,33) url("chess.png") repeat fixed top'
  13. );
  14. }
  15. }
  16. // vim: et sw=4 sts=4