mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
18 lines
484 B
PHP
18 lines
484 B
PHP
|
<?php
|
||
|
|
||
|
class HTMLPurifier_ConfigSchema_Validator_AlnumTest extends HTMLPurifier_ConfigSchema_ValidatorHarness
|
||
|
{
|
||
|
|
||
|
public function setup() {
|
||
|
parent::setup();
|
||
|
$this->validator = new HTMLPurifier_ConfigSchema_Validator_Alnum('ID');
|
||
|
}
|
||
|
|
||
|
public function testValidate() {
|
||
|
$this->expectSchemaException('R&D in ID must be alphanumeric');
|
||
|
$arr = array('ID' => 'R&D');
|
||
|
$this->validator->validate($arr, $this->interchange);
|
||
|
}
|
||
|
|
||
|
}
|