0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-13 00:38:42 +00:00
htmlpurifier/tests/HTMLPurifier/ConfigSchema/ValidatorHarness.php
2008-03-04 05:21:04 +00:00

25 lines
648 B
PHP

<?php
class HTMLPurifier_ConfigSchema_ValidatorHarness extends UnitTestCase
{
protected $interchange, $validator;
public function setup() {
$this->interchange = new HTMLPurifier_ConfigSchema_Interchange();
if (empty($this->validator)) {
$class_to_test = substr(get_class($this), 0, -4);
$this->validator = new $class_to_test;
}
}
public function teardown() {
unset($this->validator, $this->interchange);
}
protected function expectSchemaException($msg) {
$this->expectException(new HTMLPurifier_ConfigSchema_Exception($msg));
}
}