本文整理汇总了PHP中TestRunner::findDefaults方法的典型用法代码示例。如果您正苦于以下问题:PHP TestRunner::findDefaults方法的具体用法?PHP TestRunner::findDefaults怎么用?PHP TestRunner::findDefaults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestRunner
的用法示例。
在下文中一共展示了TestRunner::findDefaults方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TestRunner
* etc.
*
* @package OpenX
* @subpackage TestSuite
* @author Andrew Hill <andrew.hill@openx.org>
*
* @todo Only show HTML when run from Web.
*/
require_once 'init.php';
// Mask strict errors. Simpletest is too old for that
error_reporting(error_reporting() & ~E_STRICT);
// Required files
require_once MAX_PATH . '/tests/testClasses/TestRunner.php';
require_once MAX_PATH . '/tests/testClasses/ErrorCatcher.php';
$runner = new TestRunner();
$runner->findDefaults();
$oErrorCatcher = new SimpletestErrorCatcher($runner);
/* TODO: Extract this to the paintHeader() method of a reporter */
if ($runner->output_format_name == 'html') {
echo "<style type=\"text/css\">\n";
echo file_get_contents(MAX_PATH . '/tests/testClasses/tests.css');
echo "</style>\n";
}
/* TODO: Consider a non-Web environment */
if (defined('TEST_ENVIRONMENT_NO_CONFIG')) {
echo "<h1>Cannot Run Tests</h1>\n";
echo "<p>You have not copied the the test.conf.php file in the\n";
echo "/etc directory into the /var directory, and edited the file,\n";
echo "so that it contains your database server details.</p>\n";
exit;
}