2008-03-02 01:55:14 +00:00
|
|
|
<?php
|
|
|
|
|
2008-03-02 02:57:31 +00:00
|
|
|
class HTMLPurifier_ConfigSchema_ValidatorHarness extends UnitTestCase
|
2008-03-02 01:55:14 +00:00
|
|
|
{
|
|
|
|
|
2008-03-02 02:57:31 +00:00
|
|
|
protected $interchange, $validator;
|
2008-03-02 01:55:14 +00:00
|
|
|
|
|
|
|
public function setup() {
|
2008-03-04 04:13:07 +00:00
|
|
|
$this->interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
2008-03-04 05:21:04 +00:00
|
|
|
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);
|
2008-03-02 01:55:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function expectSchemaException($msg) {
|
|
|
|
$this->expectException(new HTMLPurifier_ConfigSchema_Exception($msg));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|