mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 13:18:00 +02:00
Make context errors more friendly; factor out disabled; fix broken test cases; update TODO.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1220 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -30,11 +30,11 @@ class HTMLPurifier_ContextTest extends UnitTestCase
|
||||
$this->context->destroy('IDAccumulator');
|
||||
$this->assertFalse($this->context->exists('IDAccumulator'));
|
||||
|
||||
$this->expectError('Attempted to retrieve non-existent variable');
|
||||
$this->expectError('Attempted to retrieve non-existent variable IDAccumulator');
|
||||
$accumulator_3 =& $this->context->get('IDAccumulator');
|
||||
$this->assertNull($accumulator_3);
|
||||
|
||||
$this->expectError('Attempted to destroy non-existent variable');
|
||||
$this->expectError('Attempted to destroy non-existent variable IDAccumulator');
|
||||
$this->context->destroy('IDAccumulator');
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class HTMLPurifier_ContextTest extends UnitTestCase
|
||||
$var = true;
|
||||
$this->context->register('OnceOnly', $var);
|
||||
|
||||
$this->expectError('Name collision, cannot re-register');
|
||||
$this->expectError('Name OnceOnly produces collision, cannot re-register');
|
||||
$this->context->register('OnceOnly', $var);
|
||||
|
||||
// destroy it, now registration is okay
|
||||
|
@@ -235,7 +235,7 @@ http://dev.example.com',
|
||||
|
||||
$this->assertResult(
|
||||
'http://example.com <div>http://example.com</div>',
|
||||
'<p><a href="http://example.com">http://example.com</a></p><div><a href="http://example.com">http://example.com</a></div>'
|
||||
'<p><a href="http://example.com">http://example.com</a> </p><div><a href="http://example.com">http://example.com</a></div>'
|
||||
);
|
||||
|
||||
$this->assertResult(
|
||||
|
Reference in New Issue
Block a user