本文整理匯總了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;
}