mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 21:28:06 +02:00
[1.2.0] Unit test housekeeping:
- HTMLPurifier_Context doesn't throw a variable reference error if you attempt to retrieve a non-existent variable . Cleaned up test-cases to remove unnecessary swallowErrors() git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@525 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -32,11 +32,9 @@ class HTMLPurifier_ContextTest extends UnitTestCase
|
||||
$accumulator_3 =& $this->context->get('IDAccumulator');
|
||||
$this->assertError('Attempted to retrieve non-existent variable');
|
||||
$this->assertNull($accumulator_3);
|
||||
$this->swallowErrors();
|
||||
|
||||
$this->context->destroy('IDAccumulator');
|
||||
$this->assertError('Attempted to destroy non-existent variable');
|
||||
$this->swallowErrors();
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +46,6 @@ class HTMLPurifier_ContextTest extends UnitTestCase
|
||||
|
||||
$this->context->register('OnceOnly', $var);
|
||||
$this->assertError('Name collision, cannot re-register');
|
||||
$this->swallowErrors();
|
||||
|
||||
// destroy it, now registration is okay
|
||||
$this->context->destroy('OnceOnly');
|
||||
|
Reference in New Issue
Block a user