mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-09 23:57:03 +02:00
[3.1.0] Implement tag@attr for Allowed and Forbidden
- Fix (or null) bug in configdoc git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1695 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -10,15 +10,27 @@ class HTMLPurifier_Harness extends UnitTestCase
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected $config, $context;
|
||||
protected $config, $context, $purifier;
|
||||
|
||||
/**
|
||||
* Generates easily accessible default config/context
|
||||
* Generates easily accessible default config/context, as well as
|
||||
* a convenience purifier for integration testing.
|
||||
*/
|
||||
public function setUp() {
|
||||
list($this->config, $this->context) = $this->createCommon();
|
||||
$this->purifier = new HTMLPurifier();
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts a purification. Good for integration testing.
|
||||
*/
|
||||
function assertPurification($input, $expect = null) {
|
||||
if ($expect === null) $expect = $input;
|
||||
$result = $this->purifier->purify($input, $this->config);
|
||||
$this->assertIdentical($expect, $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accepts config and context and prepares them into a valid state
|
||||
* @param &$config Reference to config variable
|
||||
|
Reference in New Issue
Block a user