2006-10-01 20:47:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2007-08-01 14:06:59 +00:00
|
|
|
* All-use harness, use this rather than SimpleTest's
|
2006-10-01 20:47:07 +00:00
|
|
|
*/
|
|
|
|
class HTMLPurifier_Harness extends UnitTestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
function HTMLPurifier_Harness() {
|
|
|
|
parent::UnitTestCase();
|
|
|
|
}
|
|
|
|
|
2007-08-01 18:34:46 +00:00
|
|
|
var $config, $context;
|
|
|
|
|
|
|
|
function setUp() {
|
|
|
|
list($this->config, $this->context) = $this->createCommon();
|
|
|
|
}
|
|
|
|
|
2007-08-01 14:06:59 +00:00
|
|
|
function prepareCommon(&$config, &$context) {
|
|
|
|
$config = HTMLPurifier_Config::create($config);
|
|
|
|
if (!$context) $context = new HTMLPurifier_Context();
|
2006-10-01 20:47:07 +00:00
|
|
|
}
|
|
|
|
|
2007-08-01 18:34:46 +00:00
|
|
|
function createCommon() {
|
|
|
|
return array(HTMLPurifier_Config::createDefault(), new HTMLPurifier_Context);
|
|
|
|
}
|
|
|
|
|
2006-10-01 20:47:07 +00:00
|
|
|
}
|
|
|
|
|