2008-06-25 01:10:51 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Controller for PHPT that implements the SimpleTest unit-testing interface.
|
|
|
|
*/
|
|
|
|
class PHPT_Controller_SimpleTest extends SimpleTestCase
|
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-25 01:10:51 +00:00
|
|
|
protected $_path;
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function __construct($path)
|
|
|
|
{
|
2008-06-25 01:10:51 +00:00
|
|
|
$this->_path = $path;
|
|
|
|
parent::__construct($path);
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function testPhpt()
|
|
|
|
{
|
2008-06-25 01:10:51 +00:00
|
|
|
$suite = new PHPT_Suite(array($this->_path));
|
|
|
|
$phpt_reporter = new PHPT_Reporter_SimpleTest($this->reporter);
|
|
|
|
$suite->run($phpt_reporter);
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-25 01:10:51 +00:00
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|