2007-01-20 02:21:43 +00:00
|
|
|
<?php
|
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
class HTMLPurifier_AttrDef_CSS_BackgroundTest extends HTMLPurifier_AttrDefHarness
|
2007-01-20 02:21:43 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
function test() {
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
|
|
$this->def = new HTMLPurifier_AttrDef_CSS_Background($config);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
$valid = '#333 url(chess.png) repeat fixed 50% top';
|
|
|
|
$this->assertDef($valid);
|
|
|
|
$this->assertDef('url("chess.png") #333 50% top repeat fixed', $valid);
|
2008-03-16 19:14:39 +00:00
|
|
|
$this->assertDef(
|
|
|
|
'rgb(34, 56, 33) url(chess.png) repeat fixed top',
|
|
|
|
'rgb(34,56,33) url(chess.png) repeat fixed top'
|
|
|
|
);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
|
|
|
|