mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-10 16:01:53 +00:00
3441421e8b
- Port ConfigSchema and Config tests to new syntax - Deprecate Debugger - Add $schema params to most Config convenience functions - Add --php flag to testing scripts for command line - NOT TESTED WITH MULTITEST.PHP! git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1551 48356398-32a2-884e-a903-53898d9a118a
29 lines
778 B
PHP
29 lines
778 B
PHP
<?php
|
|
|
|
/**
|
|
* Controller for PHPT that implements the SimpleTest unit-testing interface.
|
|
*/
|
|
class PHPT_Controller_SimpleTest extends SimpleTestCase
|
|
{
|
|
|
|
protected $_path;
|
|
|
|
public function __construct($path) {
|
|
$this->_path = $path;
|
|
parent::SimpleTestCase($path);
|
|
}
|
|
|
|
public function testPhpt() {
|
|
if (is_dir($this->_path)) {
|
|
$factory = new PHPT_Suite_Factory();
|
|
$suite = $factory->factory($this->_path, true);
|
|
} else {
|
|
$suite = new PHPT_Suite(array($this->_path));
|
|
}
|
|
// Adapter class that relays messages to SimpleTest
|
|
$phpt_reporter = new PHPT_Reporter_SimpleTest($this->_reporter);
|
|
$suite->run($phpt_reporter);
|
|
}
|
|
|
|
}
|