mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-17 14:08:15 +01:00
797b899305
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1334 48356398-32a2-884e-a903-53898d9a118a
30 lines
649 B
PHP
30 lines
649 B
PHP
<?php
|
|
|
|
/**
|
|
* All-use harness, use this rather than SimpleTest's
|
|
*/
|
|
class HTMLPurifier_Harness extends UnitTestCase
|
|
{
|
|
|
|
function HTMLPurifier_Harness() {
|
|
parent::UnitTestCase();
|
|
}
|
|
|
|
var $config, $context;
|
|
|
|
function setUp() {
|
|
list($this->config, $this->context) = $this->createCommon();
|
|
}
|
|
|
|
function prepareCommon(&$config, &$context) {
|
|
$config = HTMLPurifier_Config::create($config);
|
|
if (!$context) $context = new HTMLPurifier_Context();
|
|
}
|
|
|
|
function createCommon() {
|
|
return array(HTMLPurifier_Config::createDefault(), new HTMLPurifier_Context);
|
|
}
|
|
|
|
}
|
|
|