2008-02-16 00:40:30 +00:00
|
|
|
<?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;
|
2008-04-21 15:24:18 +00:00
|
|
|
parent::__construct($path);
|
2008-02-16 00:40:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testPhpt() {
|
2008-02-16 18:03:51 +00:00
|
|
|
$suite = new PHPT_Suite(array($this->_path));
|
2008-02-16 00:40:30 +00:00
|
|
|
$phpt_reporter = new PHPT_Reporter_SimpleTest($this->_reporter);
|
|
|
|
$suite->run($phpt_reporter);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|