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 02:28:20 -05:00
|
|
|
|
2013-07-16 13:56:14 +02:00
|
|
|
public function test()
|
|
|
|
{
|
2007-02-14 20:38:51 +00:00
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
|
|
$this->def = new HTMLPurifier_AttrDef_CSS_Background($config);
|
2008-12-06 02:28:20 -05:00
|
|
|
|
2010-05-21 11:53:52 -04:00
|
|
|
$valid = '#333 url("chess.png") repeat fixed 50% top';
|
2007-01-20 02:21:43 +00:00
|
|
|
$this->assertDef($valid);
|
2010-05-21 11:53:52 -04:00
|
|
|
$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',
|
2010-05-21 11:53:52 -04:00
|
|
|
'rgb(34,56,33) url("chess.png") repeat fixed top'
|
2008-03-16 19:14:39 +00:00
|
|
|
);
|
2008-12-06 02:28:20 -05:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
2008-12-06 02:28:20 -05:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 04:24:59 -05:00
|
|
|
// vim: et sw=4 sts=4
|