runTests($tests); } /** * Run only a single test class */ function only() { $className = $this->urlParams['ID']; if(class_exists($className)) { $this->runTests(array($className)); } else { echo "Class '$className' not found"; } } function runTests($classList) { echo "

Sapphire PHPUnit Test Runner

"; echo "

Using the following subclasses of SapphireTest for testing: " . implode(", ", $classList) . "

"; echo "
";
		$suite = new PHPUnit_Framework_TestSuite();
		foreach($classList as $className) {
			$suite->addTest(new PHPUnit_Framework_TestSuite($className));
		}

		/*, array("reportDirectory" => "/Users/sminnee/phpunit-report")*/
		PHPUnit_TextUI_TestRunner::run($suite);
	}
}

} else {

class TestRunner extends Controller {
	function index() {
		echo "Please install PHPUnit using pear.";
	}
}

}