first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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;
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Proxies results from PHPT_Reporter to SimpleTest's reporter
|
||||
|
||||
*/
|
||||
|
||||
class PHPT_Reporter_SimpleTest implements PHPT_Reporter
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
/** SimpleTest reporter to proxy results to */
|
||||
|
||||
protected $reporter;
|
||||
|
||||
|
||||
|
||||
/** @param SimpleTest reporter */
|
||||
|
||||
public function __construct($reporter) {
|
||||
|
||||
$this->reporter = $reporter;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: Figure out what the proper calls should be, since we've given
|
||||
|
||||
// each Suite its own UnitTestCase controller
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Called when the Reporter is started from a PHPT_Suite
|
||||
|
||||
* @todo Figure out if Suites can be named
|
||||
|
||||
*/
|
||||
|
||||
public function onSuiteStart(PHPT_Suite $suite) {
|
||||
|
||||
//$this->reporter->paintGroupStart('PHPT Suite', $suite->count());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Called when the Reporter is finished in a PHPT_Suite
|
||||
|
||||
*/
|
||||
|
||||
public function onSuiteEnd(PHPT_Suite $suite) {
|
||||
|
||||
//$this->reporter->paintGroupEnd('PHPT Suite');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Called when a Case is started
|
||||
|
||||
*/
|
||||
|
||||
public function onCaseStart(PHPT_Case $case) {
|
||||
|
||||
//$this->reporter->paintCaseStart($case->name);
|
||||
Reference in New Issue
Block a user