mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-05 06:01:52 +00:00
Rewrite spurious encoding test, as utf8 is sometimes useful.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
parent
c5b18d345c
commit
ab263a0bf1
@ -39,10 +39,8 @@ class HTMLPurifier_EncoderTest extends HTMLPurifier_Harness
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_convertToUTF8_spuriousEncoding() {
|
function test_convertToUTF8_spuriousEncoding() {
|
||||||
// We don't support this as UTF-8, because UTF-8 is the default and
|
$this->config->set('Core', 'Encoding', 'utf99');
|
||||||
// shouldn't be set if not necessary.
|
$this->expectError('Invalid encoding utf99');
|
||||||
$this->config->set('Core', 'Encoding', 'utf8');
|
|
||||||
$this->expectError('Invalid encoding utf8');
|
|
||||||
$this->assertIdentical(
|
$this->assertIdentical(
|
||||||
HTMLPurifier_Encoder::convertToUTF8("\xF6", $this->config, $this->context),
|
HTMLPurifier_Encoder::convertToUTF8("\xF6", $this->config, $this->context),
|
||||||
''
|
''
|
||||||
|
Loading…
Reference in New Issue
Block a user